Hi,
Using Oracle 11gr2. I'm trying to develop an expression which replaces all characters not found on the keyboard with the number 2. However, the expression I've developed doesn't seem to handle all characters. When testing it out, some characters are replaced successfully, while others aren't. For example, if I remove the () from the regexp_replace list, I should expect the query's result to show 22, but it doesn't. Similar results happened for other characters. Here's my query. Any suggestions would be appreciated.
select
regexp_replace('$#()/*%.,''&-~`:+!@^_=|\;"<>?/[]{}', '[^A-Za-z0-9$#()/*%.,''&-~`:+!@^_=|\;"<>?/[]{}]', '2') as test
from dual