SQL Language (MOSC)

MOSC Banner

Confused on REGEXP_LIKE using Negate Option

edited Apr 11, 2014 10:40AM in SQL Language (MOSC) 12 commentsAnswered ✓

Hi Folks

I am using Oracle 10.2.0.5

My goal is to search a string for any characters other than alphanumeric plus any other characters I may want to add later, but in my tests I do not seem to understand the negate option

as my test is not eliminating records or is not selecting records I would think be listed

If I use the negate of :alnum:, then the list comes out correctly

select

   reg_nbr,

   reg_name

from

   testreg

where

REGEXP_LIKE (reg_name,'[^[:alnum:]]+')

order by

   reg_nbr;

   REG_NBR REG_NAME

---------- --------------------

         3 ABcd~()

         4 [Test Data]

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center