Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Regular Expression check for non matching string

Reply
Thread Tools

Regular Expression check for non matching string

 
 
outoftherealm@hotmail.com
Guest
Posts: n/a
 
      09-22-2005
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!

 
Reply With Quote
 
 
 
 
Lord0
Guest
Posts: n/a
 
      09-22-2005

(E-Mail Removed) wrote:
> 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)$/;

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      09-22-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:1127402861.992931.76080
@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

--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching abitrary expression in a regular expression =?iso-8859-1?B?bW9vcJk=?= Java 8 12-02-2005 12:51 AM
Regular Expression and string Matching/Replace sanjay010@yahoo.com Java 6 10-07-2005 03:36 AM
Regular Expression matching double quotes Codex Twin ASP .Net 1 04-18-2005 07:22 PM
regular expression to check a string is alphanumeric only Matt Javascript 6 09-23-2004 07:20 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments