18
6
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".
Why exactly are you trying to find the start of a new line? Do you want to add something at the beginning of every line? That would help us actually answer the question. If you are using Notepad++ in order to move away from a paid solution, you will have to learn its quirks and work around them. I have had no problem doing this, since Notepad++ is very good in so many other ways. – Joshua Nurczyk – 2016-04-20T06:48:10.260
I've used TextPad and found this same issue to be annoying (to put it mildly). Basically, Npp's Regex functionality is stunted when comared to most other Regex-s. This stems from the fact that Npp is an abstraction of the Scintilla Editor which uses a single-line-based RegEx :( -- The Npp crew are quite well aware of this issue, but it has (oddly) been on the back-burner (a time and resources issue). $ does work, but they haven't got ^ to work multi-line (yet). I know this limitation, and work with (and aroud it). As mentioned below ^(.) works. (Rarely, I revert to TPad or UltraEdit) – Peter.O – 2010-08-05T23:59:10.110
1PS. you can often use Extended (vs RegEx ) as a workaround for \r and \n - this semi-mimics a start-of-line. Also, as a by-the-way, you can stay in Normal search and turn on View -- Show Symbol -- Show End of Line.. Although they don't (visually) appear in the Find-field, if you select CRLF first, the Find-field auto-prime kicks in when you press CTRL+F, and it quite happily becomes a multi-line (but not RegEx) search. Its not much different to Extended search, but I found it to be interesting, and some readers may also find it so. (I love Npp :) – Peter.O – 2010-08-06T00:21:55.053