3 Apr
2006
3 Apr
'06
10:12 p.m.
admin@geocodenet.com wrote :
When I use this regular expression:
^(*.)a(*.)
Isn't it ^(.*)a(.*) rather ?
Or am I getting exactly what I'm supposed to be getting here?
This is the normal behaviour. You don't get all possibilities of how the string could be matched, you only get one. In your case you have two couples of parentheses, so you capture two strings. Your "shouldn't I get 5 strings" doesn't really make sense.
1==>M 2==>nagement
This is what you get if you use (.*?) (ungreedy)
1==>Man 2==>gement
This is what you get if you use (.*) (greedy)