PL / SQL function to return a string with special characters regexp escaped

Is there an existing PL / SQL method that takes a string and returns the same string, but with backslashes preceding any regular expression characters?

+3
source share
1 answer

Try the following:

result := REGEXP_REPLACE(subject, '([$^[()+*?{\|])', '\\\1', 1, 0, 'c'); 
+1
source

All Articles