xquery replace issue in Oracle Service Bus
===

I'm trying to replace two backslashes with a single one within Oracle Service Bus xquery transformation with the replace function:

let $str := replace($srcStr, "\\\\\\\\", "\\\\"), where $srcStr holds the value "^\\\\d{1,4}$"

But for some reason this does not work. The result is stil "^\\\\d{1,4}$"

When I'm calling the same function in e.g. Altova XmlSpy this works fine: replace("^\\\\d{1,4}$", "\\\\\\\\", "\\\\") results in ^\d{1,4}

Does anybody have an idea why OSB does not match the backslashes in the source string? What could be a workaround?
