The following question will answer my original question, plus many others. What would the correct syntax be to do a REGEXP_LIKE search (in Oracle Database 12c) for this string (which exists somewhere in a CLOB)? In other words, pretend like you want to find this exact string:
%.,"'?!:#$&)(*;+-/<>=@[]\^_{}|~ using:
"select * from my_table where regexp_like (some_column, '" + regexSearchString + "')" Now, from everything I've read, you would need to transform the string by escaping the necessary characters (\ ^ . $ | ( ) [ ] * + ? { } ,) to get it to work, like this:
%\.\,"'\?!:#\$&\)\(\*;\+-/<>=@\[\]\\\^_\{\}\|~ Now I haven't tested every non-escaped character like &, _, or %, but I have found that searches with < or > are not found. Even though REGEXP_LIKE is not needed in the following example, say I wanted to find all occurrences of ><div class=, for whatever reason. Is there an additional thing that needs to be done to get it to correctly treat angle brackets just like any other letter?