I am trying to move away from TextPad, and I just can't get regular expressions like ^
and $
to be replaced. I have definitely ticked the regular expression box.
What am I doing wrong?
I am trying to find the start of a new line. In TextPad, it is find '^' and ensure regular expressions is enabled. With Notepad++ it does not do that. It just says "Not found".
Best Answer
^ and $ are both anchors in Regex, which means if you want to replace the literal chars
^
and$
you need to escape them, usually with a leading backslash (\^
, and\$
).To find the first character on a line use
^.
The start line anchor (
^
) is a zero-width match, so combining it with the . will find any character at the beginning of a line.Maybe you can explain what you're actually trying to do?