question

iainrobertson avatar image
iainrobertson asked

Regex Find and Replace Incorrectly Substitutes Values

Hi, When scripting, I often use regex find and replace to convert vertical lists to horizontal ones with commas and vice-versa, e.g. From: 1131002 1131004 1131006 1131007 1131008 1131010 1131012 1131013 1131016 1131020 To: 1131002,1131004,1131006,1131007,1131008,1131010,1131012,1131013,1131016,1131020 Sometimes I find that the initial character of one or more of the inputs gets substituted with a comma when it shouldn't, e.g. 1131002,,131004,1131006,1131007,1131008,1131010,1131012,1131013,1131016,1131020 Settings: Find what: \\n Replace with: , Does anyone else ever come across this? Is there a reason for it?
replaceregex
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.