use warnings; use strict; undef $/; my $content = <DATA>; $content =~ s/<span style="font.*/<span style="font-weight: bold;">/gi +; print "$content\n"; __DATA__ <span style="font-weight: bold;color:#000000;"> <span style="font-family:Arial MT;font-size: 25px; font-weight: bold;" +> <span style="color:#000000;" xmlns="http://www.w3.org/1999/xhtml">
prints:
<span style="font-weight: bold;"> <span style="font-weight: bold;"> <span style="color:#000000;" xmlns="http://www.w3.org/1999/xhtml">
See also:
In reply to Re: Regular expression
by toolic
in thread Regular expression
by sharief
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |