Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chrtran() applied selectively
Message
From
07/06/2016 02:55:03
 
 
To
07/06/2016 02:29:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636985
Message ID:
01637041
Views:
46
Likes (1)
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}\])'
>
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform