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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -