Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chrtran() applied selectively
Message
De
07/06/2016 03:09:01
 
 
À
07/06/2016 02:55:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01636985
Message ID:
01637043
Vues:
38
Yes, that is also a possibility

You have to know the data before you can take a good decision

>Karen, adding to what Gregory already explained and suggested, another possibility would be "(\[\d+)[^\d]+(\d+\])", meaning that the separator could be anything non-digit that could extend beyond a single character. For instance, it would match and replace "1st-title: ANAME-HER : 3520931 place[99 - 100]" into "1st-title: ANAME-HER : 3520931 place[99.100]".
>
>>actually your solution greg does well but does not replace a space with a dot whereas Antonio's solution does.
>>
>>s ='1st-title: ANAME-HER : 3520931 place[4443 4444]' &&&XXX
>>
>>using Antonio's middle parameter replaces space with dot - so perhaps combining the two.
>>
>>regexObj.Pattern = '(\[\d{1,4}).(\d{1,4}\])'
>>
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform