Test Window: Avoid regex character classes being misinterpreted as bind variables

Bernhard S

Member³
In my test window I'm using a regular expressions, i.e. REGEXP_SUBSTR (..) containing Posix character classes, i.e. [:digit:]. Those ones in a test window however get wrongly interpreted as bind variables resulting in an ORA-1036 "illegal variable name/number" when trying to execute.
I found a workaround using a separately declared constant containing the colon and using concatenation with this constant in my regular expression. Not pretty but it works. Are there any better workarounds?
In a command window the anonymous block works fine without a workaround for the colon.
It should of course be fixed in PL/SQL Developer and such classes should not be misinterpreted as bind variables in test window either.
 
Back
Top