Lists Home |
Date Index |
I'm not a linguistics expert but I think that regular expressions and
XPath expressions come at different levels of the Chomsky hierarchy 
- regular expressions would be type 3, Regular, but XPath would be type
2, Context Free. One notable difference is that you can't specify
balanced syntax with type 3 grammars, so you couldn't specify anything
requiring correctly nested square or round brackets for instance.
Hope this helps -
Niels Peter Strandberg wrote:
> Shouldn't it be possible to validate the syntax of an XPath string
> using regular expressions. Im not a regex expert, so just want to ask
> you out there if it could be done.