in reply to Help with Regex
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with Regex
by TomDLux (Vicar) on Jul 07, 2004 at 03:33 UTC | |
by wfsp (Abbot) on Jul 07, 2004 at 07:08 UTC | |
|
Re^2: Help with Regex
by ercparker (Hermit) on Jul 07, 2004 at 02:02 UTC |