This works fine as long as the html tags do not encompass other html tags. In this case they do and it will only find html. Is there something I'm doing wrong? I've tried everything.$content = "<head><body blah></body><foo></foo></head>"; while ($content =~ /<([^(?:\s|>)]+).*>.*<\/\1>/ig) { print $1."\n"; }
In reply to Re: Help with Regex
by Mercio
in thread Help with Regex
by Mercio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |