in reply to keeping one pattern but removing all else from a string
Unfortunately I had to make up the code without any bit of testing as I don't have the means to do so on this particular PC (Have to reboot my Win2000 OS as the MS-DOS command prompt wouldn't work for some reason ;/)my $font_tag_match = m{ # Tags in pairs like <foo>content</foo> \< \s* (<font[a-z:\=]>+) [ \s*<[a-z:]>* \s* = \s* [ ' <[^']>* ' | " <[^"]>* " ] ]* \s* \> [ <[^<>]>* | <xml> ]* \< \s* / \s* font \s* \> }x; # remove all text that is not between a pair of <font> tags.. $input_data =~ s/^$font_tag_match//mg;
# Under Construction
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: keeping one pattern but removing all else from a string
by Anonymous Monk on Jul 13, 2002 at 04:04 UTC |