I am aware that HTML Should Not Be Parsed With RegEx.
Nonetheless, there are exceptions. I am trying to take the following text:
br > Email: fooBar@yahoo.com<br>Name: Barbara Foo<br> Phone: 888888888<br>Professio
and regEx out
Barbara Foo
from it.
The RegEx I am trying to use is Name: (.*)((?=\\r)|(?=<br>))
. Note that I am trying to stop capturing at <br>
with (?=<br>)
. This does NOT work. It works perfectly well with any word, phrases, etc, but not <br>
.
How do I get this to work?
RegEx tester for C# here matches what I see when running locally: http://regexstorm.net/tester
According to my research, angle brackets are not special characters to RegEx.
))` – kishkin Mar 31 '20 at 15:51
)` You could turn the lookahead in a match if you want the group value. – The fourth bird Mar 31 '20 at 15:51