FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

News

 
Post new topic   Reply to topic     Forum Index -> scregexp
View previous topic :: View next topic  
Author Message
mp4



Joined: 22 Jun 2007
Posts: 19

PostPosted: Sat Apr 18, 2009 10:44 am    Post subject: News Reply with quote

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
View user's profile Send private message
mp4



Joined: 22 Jun 2007
Posts: 19

PostPosted: Sat Jan 21, 2012 10:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> scregexp All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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