in reply to Re^2: Stripping HTML tags efficiently
in thread Stripping HTML tags efficiently
You want to strip out all the tags from the original data, but gether them all in a separate place? Okay, instead of doing nothing ("1"), gather the data.
my @extragted_tags; push @extracted_tags, $1 while s/$pattern/" " x length $1/ge;
(Not tested, either!)
This puts the separate tags in separate elements of @extracted_tags. If you want them all together in a single string, try this.
my $extracted_tags; $extracted_tags .= $1 while s/$pattern/" " x length $1/ge;
The better you manage to specify what you want to do, the easier it will be for you to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Stripping HTML tags efficiently
by agynr (Acolyte) on Dec 11, 2004 at 09:14 UTC | |
by gaal (Parson) on Dec 11, 2004 at 09:36 UTC | |
by agynr (Acolyte) on Dec 11, 2004 at 10:53 UTC |