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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -