in reply to Re: Help with Regex
in thread Help with Regex
if you just wanted to match and print out the individual tags you could do this$content = "<head><body blah></body><foo></foo></head>"; $content =~ m[^(<(.+?)>.*?</\2>)$]; print $1."\n";
a great tutorial on perlmonks covering how a regex will match$content = "<head><body blah></body><foo></foo></head>"; while ($content =~ m[(<.+?>)]g) { print $1."\n"; }
|
|---|