|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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. |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Tue Nov 02, 2004 11:07 pm |
Solved it myself. Sorry :P. Solution
pattern: a.*?b |
|
|
|
|
|