I have used the Text Find/Replace to perform other regular expressions searches, but when I was trying to replace the beginning of every line with a ", I used the ^ as the search string and " as the replacement string with the Match as regular expression checked and the Match instances to All. In the next Test Find/Replace action, I used $ as the search string, Neither of these actions got any matches. However, when I do a regular expression search in Notepad++ with the ^ and then with the $, I get the results I want.
I read about modifiers, but I am not sure of the syntax. I tried (?m)^ and /m^, but I was still unsuccessful. This seems like a simple task, and I am sure I am missing something obvious,
Any ideas/advice?
I am using FinalBuilder 7.0.0.2469.
Thanks!
Although I would still like to know the regular expression method for achieving this, I was able to workaround this by using the File Contents Iterator, writing each line’s contents out to a temp file between quotes, and then moving the file back to the original file name. Not the most elegant of solutions, but it gets the job done. If someone can point out what I am missing with my regular expression above, I would like to use that for performance reasons.
Hi Deidre,
I believe you can quote the lines with just one Find/Replace:
Search: (.+)
Replace: "$1"
Ensure that:
- on the Find String tab, you have Match As Regular Expression checked and “All” selected from the dropdown
- on the Replace tab, you have the “Substitute Reg…” option checked
Thanks,
Dave
Perfect! Thank you!