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

Click here to load this message in the networking platform