View previous topic :: View next topic |
Author |
Message |
mp4
Joined: 22 Jun 2007 Posts: 19
|
Posted: Sat Apr 18, 2009 10:44 am Post subject: News |
|
|
The regular expression engine has been extended and improved.
It now recognises \D,\W,\S switches.
Also, one can use possessive quantifiers.
More about them here : http://search.cpan.org/dist/perl-5.10.0/pod/perl5100delta.pod#Regular_expressions
Quote: |
Basically a possessive quantifier matches as much as it can and never gives any back. Thus it can be used to control backtracking. The syntax is similar to non-greedy matching, except instead of using a '?' as the modifier the '+' is used. Thus ?+, *+, ++, {min,max}+ are now legal quantifiers. |
They often can be used instead of greedy matching...
Using it, the engine runs faster.
E.g \w+ \w+ With possessive quantifiers: \w++ \w++ |
|
Back to top |
|
|
mp4
Joined: 22 Jun 2007 Posts: 19
|
Posted: Sat Jan 21, 2012 10:37 am Post subject: |
|
|
I added D2 version of scregexp to the repository.
It seems to work well with D2, unlike in D1 where the compiler gave incorrect errors message or too strict ones..
Tested with D2.057... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|