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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -