Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular Expressions
Message
From
12/03/2003 13:08:48
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00764314
Message ID:
00765003
Views:
20
Michael,

Thanks. That was it.

Thanks again,
Dan

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform