Any occurance of
<br> </br> <br clear="all"> <br/> <br />
Here's my string
<br></br><br clear="all">Hello bright girl<br/><br /></br>
I am trying the .net regex like this
Expand|Select|Wrap|Line Numbers
- sLine = System.Text.RegularExpressions.Regex.Replace(sLine, "<\/?br.*>", String.Empty, RegularExpressions.RegexOptions.IgnoreCase)
and that's it!
What is wrong with my syntax?
Here's my thinking
< is the literal
\/? escapes the / so I am looking for 0 or 1 / (forward slash)
br is a literal string because I'm looking for "br"
.* I am looking for 0 to many of any character
> the closing literal
I've tried all kinds of combinations - and get close...
The following pattern works pretty well: "<\/?br\W*>"
I get the following string:
<b><h1><br clear="all">Hello bright girl</h1></b>
For some reason, however, it misses the <br clear="all">