Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular Expressions
Message
De
12/03/2003 13:08:48
 
 
À
12/03/2003 09:03:08
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00764314
Message ID:
00765003
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform