- or download this
my $open = qr{
< [a-zA-Z][a-zA-Z0-9]*
...
\s*
>
}x;
- or download this
my $close = qr{
< / \s* [a-zA-Z][a-zA-Z0-9]* \s* >
}x;
- or download this
# the following are comments:
# <!-- ab -- cd --> <!-- ab --> <!---->
...
)* # 0 or more times
-- \s* > # --, space, then >
}x;
- or download this
while ($HTML =~ /\G($open|$close|$comment|[^<]+)/g) {
# do something with $1
}
- or download this
# requires the (?{...}) structure
use re 'eval';
...
}xg) {
# do something with $1 and $STATE
}