Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: regex help

From: "Your Name" <ratesnow@------------------.--->
To: xmlschema-dev@--.---
Date: 1/18/2007 5:01:00 PM
Just a note on the greediness mentioned here...

My understanding is that the greediness of a regular expression is 
only an 
issue when you are capturing the values of sub-patterns within the 
target 
data.  (e.g. in Perl 'ML123' =~ /ML(\d+)/; captures 123 into $1.)  
When only 
doing matching, eventually, if possible, the pattern will be matched 
irrespective of whether greedy or non-greedy matching is used.

Greediness just affects whether the regular expression engine attempts 
to 
grab lots of content for a sub-expression in it's first attempt and 
them 
back track, or attempts to capture the minimal amount in its first 
attempt 
and then forward track (not sure if that's a proper term!).

If anyone's opinion differs, please let me know



From mike@s... Mon Jan 22 00:00:48 2007
Received: from lisa


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent