Subject: Re: [xsl] Regular Expressions in XPath 2.0 From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx> Date: Sun, 22 Apr 2007 00:44:58 -0400 |
I read all replies and would like to thank everyone for further guidance and replies.
Almost every Regexp package in every language, find it's root in Perl's regexp. Similar but not identical. Pretty well a subset of what's in Perl.
They are similar and certainly not identical An important information, is that they are an extension of XML Schema's Regexp.
I would say that learning them for XPath, is a good start because you can test them easily in XSLT examples.
Thanks, infact one of the first examples in the XSLT 2.0 Reference book is an excellent implementation of tabulating work frequencies. I tried this example, and I'm going to try more examples as well.
This is a good place to start... http://www.roblocher.com/technotes/regexp.aspx
Thanks for the above link, it's nice to have a tabular reference of patterns as shown with the link, I tried the pattern \W+ , to match one or more non-word characters, it matched the first non-word. Nevertheless, it's a useful reference.
Don't know if this is close or very different from the XPath 2.0 regexs, but this seems like an extensive tutorial: http://www.regular-expressions.info/tutorial.html
Thanks for the link, I also have a book on RegEx, but in school we were taught regular expressions with diagrams -- I think those were Finite Automata diagrams -- unfortunately none of the books or websites (tutorials) on Regular Expressions use those diagrams to represent regular expression patterns.
Regular expression pattern diagrams really helped in understanding or in representing regular expressions.
I'll research on text books/sites etc that explain Regular Expressions in automata diagrams.
There's no standard.
but in recent years many languages have imitated Perl to some extent, despite the fact that Perl regular expressions are very poorly specified (try for example to find the rules on when \n is a back-reference and when it is an octal character escape).
although perl is just a youngster really and picked up much of that from teh usual unix tools such as sed and awk, regular expressions themselves are of course rather older than digital computers, so much older than perl.
-Regards Rashmi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Regular Expressions in XP, Michael Kay | Thread | Re: [xsl] Regular Expressions in XP, Rashmi Rubdi |
RE: [xsl] Regular Expressions in XP, Michael Kay | Date | Re: [xsl] Regular Expressions in XP, Rashmi Rubdi |
Month |