Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular Expressions
Message
From
12/03/2003 09:03:08
 
 
To
11/03/2003 12:03:33
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00764314
Message ID:
00764727
Views:
26
You've bumped into the greedy part of .*. Try using the lazy quantifier *?
<(?i:user)>(?<result>.*?)</(?i:user)>
-Mike

>Im trying to parse the users from this string:
>
>
><user>Dan</user><user>Fred</user><user>Dave</user>
>I tried the expression:
>
><(?i:user)>(?<result>.*)</(?i:user)>
>
>but that gave the result:
>
>Dan</user><user>Fred</user><user>Dave
>
>It picked if the first <user> and the last </user>.
>
>
>
>Anyone have any ideas?
>
>Thanks,
>Dan
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform