Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chrtran() applied selectively
Message
From
07/06/2016 13:20:55
 
 
To
07/06/2016 02:55:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636985
Message ID:
01637078
Views:
66
many thanks for this Antonio - this was the one remaining variation that was not working - nicely done. I have several other programs that will be using this for.

karen


>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}\])'
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform