How do I search for an = sign at the end of the line followed by a newline char?
I’m trying to do a search and replace.
I’m trying to replace =\n with nothing (i.e. removing them).
In the search field I’m putting
and its not finding.
How do I search for =\n ?
(regular expression is on)
PeterJones last edited by
When you say
=\n, do you mean you want to search for three literal characters, or the equals followed by a newline?
Because if you are trying to find equals followed by a newline, you should know that Windows CRLF files use
\r\nas the newline sequence, not
\n. Windows is not linux.
Also, please read the forum FAQs about formatting posts. Based on the number of edits while I was typing this, where you are trying to show your text better, it is painfully obvious that you haven’t read those FAQs.
- Please Read Before Posting
- Template for Search/Replace Questions
- Formatting Forum Posts
- FAQ: Where to find regular expressions (regex) documentation
- Notepad++ Online User Manual: Searching/Regex
Please note: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you. If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future. But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin. The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.
@PeterJones Yes, its a literal equals sign
=followed by a newline (and I am on windows).
So I guess its
=\r\n… but its asking Notepad++ to search for the literal
=sign I was stuck at.
edit: Ok, now I put the
\rin, it is working, it is finding the
Alan Kilborn last edited by
So I guess its =\r\n …
but its asking Notepad++ to search for the literal = sign I am stuck at.
I don’t understand this part.
To search for a literal
=(the only kind I’m aware of), you just put
=in the Find what box.
Clearly there is something we are missing here…
@Alan-Kilborn Now that I put the
\rin, it is finding the literal equals sign.
Before I was putting
=\n, it should be
=\r\nas I am on Windows.