regex - Oracle query to find string not containing characters -


what oracle query return records field mytable.myname contains any characters other

  1. a-z
  2. a-z
  3. 0-9
  4. -/\()

you can use following:

select * mytable regexp_like (myname, '^[^a-za-z0-9\/\\()-]+$'); 

you can same i modifier:

select * mytable regexp_like (myname, '^[^a-z0-9\/\\()-]+$', 'i'); 

explanation:

  • ^ start of string
  • [^___ ] negative character set (which match character other characters specified inside it)
  • + match previous group more once
  • $ end of string

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -