in reply to Abusing Regular Expressions
Shalom, monks. I'm working on XML::Validator::Schema and I've become convinced that I need to use the regular expression engine to check XML Schema content models.I wonder why you are convinced you'd need regular expressions to do so. While it might be possible to do so with regular expressions, and, if I were into XML, I might do it with regular expressions just for the hack of it, I wouldn't use it for anything serious.
Checking XML schema just screams "parse me, parse me". And if the application is serious, that is, your schemas are large, you have lots of them, and time is important, you wouldn't use a recursive decent parser, but a parser that's fast (limited lookahead).
Having said that, I've posted here regular expressions to solve the 8 queens problem, and to find Hamiltonian paths in graphs. (I don't have the links). And on Dominus site (perl.plover.com, IIRC) there's an explanation of a regex I made that solves 3-SAT, proving that deciding whether regular expressions (even with (?{ }) and (??{ }) constructs) match, is NP-complete.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Abusing Regular Expressions
by samtregar (Abbot) on Sep 27, 2003 at 03:42 UTC | |
by BrowserUk (Patriarch) on Sep 27, 2003 at 10:46 UTC | |
by samtregar (Abbot) on Sep 27, 2003 at 20:23 UTC | |
by Abigail-II (Bishop) on Sep 27, 2003 at 10:55 UTC | |
by samtregar (Abbot) on Sep 27, 2003 at 15:23 UTC | |
by qq (Hermit) on Sep 28, 2003 at 15:33 UTC | |
by samtregar (Abbot) on Sep 29, 2003 at 05:00 UTC |