in reply to Re^4: Regular Expression
in thread Regular Expression
This is valid XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w +3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-ty +pe" /> <title>test</title> </head> <body/> </html>
No </body> tag, so a naive regex breaks again.
Of course you are right, the OP only wanted to match the <body> tag not the body-element.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Regular Expression
by Transient (Hermit) on Jun 28, 2005 at 19:58 UTC | |
by CountZero (Bishop) on Jun 28, 2005 at 20:20 UTC |