Oracle: REGEXP_LIKE: Strings with angle brackets aren't found (whether they are escaped or not) 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:

%.,"'?!:#$&amp;)(*;+-/&lt;&gt;=@[]\^_{}|~


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:

%\.\,"'\?!:#\$&amp;\)\(\*;\+-/&lt;&gt;=@\[\]\\\^_\{\}\|~


Now I haven't tested every non-escaped character like &amp;, _, or %, but I have found that searches with &lt; or > are not found. Even though REGEXP_LIKE is not needed in the following example, say I wanted to find all occurrences of &gt;&lt;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?
select 1 from dual where
regexp_like('%.,"''?!:#$&amp;)(*;+-/&lt;&gt;=@[]\^_{}|~', 
            '%\.,"''\?!:#\$&amp;\)\(\*;\+-/&lt;&gt;=@\[\]\\\^_\{\}\|~');


This gives, as expeced, 1.

You must escape .?$)(*+[]\^{} and |

You do not need to escape , (but it works nonetheless):

select 1 from dual where
regexp_like('%.,"''?!:#$&amp;)(*;+-/&lt;&gt;=@[]\^_{}|~', 
            '%\.\,"''\?!:#\$&amp;\)\(\*;\+-/&lt;&gt;=@\[\]\\\^_\{\}\|~');


This works:

select 1 from dual where
regexp_like('&lt;div&gt;Lets check for an &lt;strong&gt;inner&lt;/strong&gt; tag :)&lt;/div&gt;', 
            '&lt;(\w+)&gt;[^&lt;]*&lt;/\1&gt;');


Gives 1. So does what you ask for:

select 1 from dual where
regexp_like('&lt;p&gt;Lets get &lt;i&gt;this&lt;/i&gt;&lt;div class="example"&gt;example going :)&lt;/div&gt;&lt;/p&gt;', 
            '&gt;&lt;div class=');


For which you don't even need regex, by the way.

EDIT:
By guess is, that you are using a programming language to build your SQL. In that case, it is highly likely that you are not properly escaping your . If you want the SQL to include '\.' (an escaped .), you need to escape it for your lanuage too: '\\.'
Likewise, if you want '\\\^' you'd need to write '\\\\\\^'