I'm looking for a single line Regular Expression solution to the following:
I need to removes all <br> tags between "href='" and the following "'" from a string.
The solution that I have come up with is:
#------------------------ $value = "<a href='\\192.161.254.00\share\Testing\Company ABC\Discover +y <br>Forms\587 <br>Read and Write Gold V8.0.doc' target='_blank' >Fi +le on <br>Cshare</a>"; while ($value =~ m/(href='.*?)<br>(.*?')/gsi) { $value =~ s/(href='.*?)<br>(.*?')/$1$2/gsi; } #------------------------
This seems to be hunky-dorie but I’m sure that there a single line regular expression solution, don’t you?
In reply to Regular Expression Elegance by monkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |