I need an regular expression to match every line in a file with =
followed by new-line or A or B or C.
For example, I want the search to give me
They're Coming=
and
Pipeline=A
but not
#https://www.youtube.com/watch?v=eQNI1KfGXBA
I’m using NotePad++ regex match to do the search. How can I do this?
Rob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
You may search for the following pattern:
^.*=[ABC]?$
Please run the above regex search with dot all mode disabled. This is to ensure that the .*
does not match across lines.
5
Tim’s answer is hard to beat.
Assuming nothing except the end of line is to match the A, B, or C part.
To capture just the tail
(=A$)|(=B$)|(=C$)|(=$)
To capture the entire line:
.*((=A$)|(=B$)|(=C$)|(=$))
1