I’m having some difficulties in changing characters after a certain keyword (in this case it’s FOR) in a line that starts with SUM
Example:
SUM A+b+c TO var FOR D->E='' AND G->H=''
Expected Result:
SUM A+b+c To var FOR D:Field("E")='' AND G:Field("H")=''
Again any help/pointers will be greatly appreciated.
Thank you,
Andy
The replace itself can be achieved with the following:
(Example)
This does not, however, check that the string starts with
SUM. You could incorporate a simplesubstr()check:if (substr($str, 0, 4) === 'SUM ') { ... }, see working demo.