Thanks Paul. I hadn't spotted that the $ needs to be at the end of the string.
Original Message:
Sent: Wed February 28, 2024 12:29 PM
From: Paul Mendelson
Subject: Period/Full stop in substitute macro causes query error
Try
# sq( substitute( '\.$', 'ABC', '.test.test2.test3.') ) #
If you want to replace every instance you could also do:
# sq( join('ABC',split('.', 'test0.test1.test2.test3.')) ) #
------------------------------
Paul Mendelson
Original Message:
Sent: Wed February 28, 2024 11:23 AM
From: Marc Reed
Subject: Period/Full stop in substitute macro causes query error
Hi all, in 11.2.3 this macro causes a query error:
# sq( substitute( '$\.', 'ABC', '.') ) #
I have to escape the '.' character otherwise there is an error about a bad search pattern. I also want to use the special $ for the end of word. It seems the combination of $ prevents any substitution of a '.'.
Anyone have any ideas on how to replace a '.; character? Thanks
------------------------------
Marc Reed
------------------------------