G'day luxlunae,
This matches your requirements :-)
#!/usr/bin/env perl -l use strict; use warnings; my $html = '<span class="author-name" itemprop="author">Romaxton</span +>'; my $re = qr{<[^>]+>([^<]*)<[^>]+>}; print "The idea is to reduce:\n", $html; $html =~ s/$re/$1/; print "to\n", $html;
Output:
The idea is to reduce: <span class="author-name" itemprop="author">Romaxton</span> to Romaxton
-- Ken
In reply to Re: Problem with <> and regex
by kcott
in thread *fixed*Problem with <> and regex
by luxlunae
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |