- or download this
$catreg = "^(<[A-Za-z0-9]+>)*<H1>(<[A-Za-z0-9]+>)*([A-Za-z0-9]+)";
- or download this
if ( m!$catreg! ) {
- or download this
m!^(<[A-Za-z0-9]+>)*<H1>(<[A-Za-z0-9]+>)*([A-Za-z0-9]+)!
- or download this
# the lack of a $var =~ here indicates
# that we are matching against $_
...
([A-Za-z0-9]+) # matches sequential alphanumerics and
# captures all into $3
! # end of regex
- or download this
$catreg = "^(<[A-Za-z0-9]+>)*<H1>(<[A-Za-z0-9]+>)*([A-Za-z0-9]+)";
...
} else {
print "No Match\n";
}
- or download this
$_='<h1>foo</h1>blah<H1>bar</H1>more blah';
while (m!<h1>(.*?)</h1>!ig) {
print "Found $1\n";
}