In the case of following string to be parsed.
ford mustang,10,blue~~?bugatti veyron,13,black
I want to replace the ~~?
with a carriage return
Replacing with \n
just adds the string "\n"
How can this be done?
In TextEdit, open the find feature. Then, click on the "Replace" checkbox. Place your cursor in the replace text field and type ctrl+shift+return. This should insert a carriage return character that you can use for replacement.
Make sure "Use: Regular expressions" is selected in the Find and Replace dialog:
Note that for Visual Studio 2010, this doesn't work in the Visual Studio Productivity Power Tools' "Quick Find" extension (as of the July 2011 update); instead, you'll need to use the full Find and Replace dialog (use Ctrl+Shift+H, or Edit --> Find and Replace --> Replace in Files), and change the scope to "Current Document".
You can also try \x0d\x0a
in the "Replace with" box with "Use regular Expression" box checked to get carriage return + line feed using Visual Studio Find/Replace. Using \n
(line feed) is the same as \x0a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With