logie17 has asked for the wisdom of the Perl Monks concerning the following question:
Is there any way to combine the two regex examples? Thanks again.$string = substr($incoming, 0, 177); $string =~ s/\<\;?[-.a-zA-Z0-9]*.*?\>\;//gs; #This does a great j +ob axing anything basically that starts with a < and ends with a > $string =~ s/\<\;?[-.a-zA-Z0-9]*.*$//gs; #Due to my substring there + is sometimes an open bracket such as <img src...chomp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Refactoring Regular Expressions
by chromatic (Archbishop) on Apr 25, 2007 at 06:14 UTC | |
|
Re: Refactoring Regular Expressions - HTML encoded text
by varian (Chaplain) on Apr 25, 2007 at 06:51 UTC | |
|
Re: Refactoring Regular Expressions
by Herkum (Parson) on Apr 25, 2007 at 11:44 UTC | |
|
Re: Refactoring Regular Expressions
by graff (Chancellor) on Apr 26, 2007 at 01:22 UTC |