Regular Expression check for non matching string

O

outoftherealm

I was hoping sombody may be able to assist me in writing a regular
expression that checks to see if a string does not match.

I have ^(Select Salesperson)$ and currently this matches and I cant
find a way to say not equal.

Hope this makes sense.

Thanks!
 
L

Lord0

I was hoping sombody may be able to assist me in writing a regular
expression that checks to see if a string does not match.

I have ^(Select Salesperson)$ and currently this matches and I cant
find a way to say not equal.

Hope this makes sense.

Thanks!

!~/^(Select Salesperson)$/;
 
A

A. Sinan Unur

(e-mail address removed) wrote in @g49g2000cwa.googlegroups.com:
I was hoping sombody may be able to assist me in writing a regular
expression that checks to see if a string does not match.

I have ^(Select Salesperson)$ and currently this matches and I cant
find a way to say not equal.

You are better off using the inequality operator rather than a regex in
this case.

perldoc perlop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,489
Latest member
BrigidaD91

Latest Threads

Top