Find Lines starting with #
I’m following the examples online but am having no luck finding lines that start with #.
Here is a sample line:
I have thousands of lines I want to find and remove.
I’m using Notepad++ 8.4.5.
Can someone help me with a working example of how to find and mark lines start with #? I’ve tried all sorts of variations of ^#, ^[#], ^[#].* but nothing is finding the lines.
Thanks very much in advance,
Paul Wormer last edited by
@Eric-Cox Did you check Regular Expression?
Yes, I have the Mark and Find exactly as you show but it doesn’t find any matches in the source file.
The Regular Expression radio button is selected and the Find what: ^# is exactly as you show. I’m not sure what I’m doing wrong.
I see what might be the problem.
Notice the # is not the first character on the line. It is the third character.
Refining my Find: I need to find all lines where the first character is # regardless of empty blank spaces before the #.
It looks like the unquoted # is markup in the web site.
" # POST:"
Alan Kilborn last edited by
Alan Kilborn last edited by Alan Kilborn
I need to find all lines where the first character is # regardless of empty blank spaces before the #
But I’m sure the purists reading this won’t like that, so this is really more of exactly what you asked for:
BTW, thanks for clarifying your questions by posting additional times rather than editing older posts. Doing it the way you did makes it SO much clearer how your question evolved.
That worked. You are the best!!!