Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Nov 02, 2004 11:03 pm   

Non greedy pattern matching
 
Does anyone know if it is possible to make the perl patterns in zMUD non greedy?

Example:
pattern: a.*b
greedy example: acbdefb -> [acbdefb]
non greedy example: acbdefb -> [acb]defb

Where the characters between [] are matched.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Nov 02, 2004 11:07 pm   
 
Solved it myself. Sorry :P. Solution

pattern: a.*?b
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net