Negate a regular expression
- From: theillien@xxxxxxxxx (Mathew Snyder)
- Date: Fri, 29 Dec 2006 23:36:25 -0500
I'm trying to set up an if clause to exit if an answer given is anything but
either any case combination of 'y' or 'yes'. This is what I have:
exit if $ans =~ m/[^y|^yes]/i;
Will that do what I want?
Mathew
.
- Follow-Ups:
- Re: Negate a regular expression
- From: Chad Perrin
- Re: Negate a regular expression
- From: DJ Stunks
- Re: Negate a regular expression
- From: Ken Foskey
- Re: Negate a regular expression
- Prev by Date: Re: Accessing the values of HoH
- Next by Date: Re: Negate a regular expression
- Previous by thread: Determine script full path.
- Next by thread: Re: Negate a regular expression
- Index(es):