04-26-2011, 05:32 AM
Use callback function with replacerx.
Macro Macro1568
Function replacerx_callback2
Macro Macro1568
str s=
;Hello,
;
;I need to convert some characters to uppercase. my question is can this be done with a regular expression because there is no strict way to do this for me like with the ucase command. i like to search for example in a text for every 'dot' and a 'character' afterwards if found it must be an uppercase character...
;
;if possible please give me an example
;
;Thanks in advance!
REPLACERX r.frepl=&replacerx_callback2
int n=s.replacerx("\. [a-z]" r)
out
out "%i replacements" n
out s
Function replacerx_callback2