Reputation: 1
I'm trying to remove '}{' by '},{' in xquery:
fn:replace($text,'\\}\\{','\\},\\{')
and getting an error:
org.apache.xmlbeans.impl.regex.ParseException: Unexpected meta character
Upvotes: 0
Views: 3270
Reputation: 167706
Seems simple:
replace($text, '\}\{', '},{')
https://xqueryfiddle.liberty-development.net/nbUY4kv
If there can be whitespace between the curly braces you can use
replace($text, '\}\s*\{', '},{')
https://xqueryfiddle.liberty-development.net/nbUY4kv/3
Upvotes: 1