I need to replace ^A, ^B in a file, the following command is useless :s/^A/
From stackoverflow
-
You need to escape the ^ with a \, i.e.
s/\^A/^B/
. ^ denotes "start of line" in a regular expression. In the replacement text, escaping is not necessary, but possible. -
To get the
^A
character, press CTRL-V CTRL-AIf you have configured the "paste" action with CTRL-V (generally on Windows) you can use CTRL-Q instead of it.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.