RE: Regular Expression's and punctuation

2003-01-27 Thread Bob Showalter
david wrote: > Bob Showalter wrote: > > > >$error = "Message required" unless $text =~ /[:alpha:]/; > > > > is this a new syntax? or should it be: > > $error = "Message required" unless text =~ /[[:alpha:]]/; Nope, you're right. Sorry 'bout that. The POSIX character classes must appear wi

RE: Regular Expression's and punctuation

2003-01-27 Thread Mark Anderson
LS> I have a script that is used for text messaging. I added a LS> line of code to check to make sure that input is in a field LS> before the message is sent. My code is as follows: LS> LS> if($b !~ m/^\w[\w\s]*\w$/) { $error .= "Enter a message \n"; } LS> LS> This fails if the field has any

RE: Regular Expression's and punctuation

2003-01-27 Thread david
Bob Showalter wrote: > >$error = "Message required" unless $text =~ /[:alpha:]/; > is this a new syntax? or should it be: $error = "Message required" unless text =~ /[[:alpha:]]/; david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regular Expression's and punctuation

2003-01-27 Thread John Baker
On Mon, 27 Jan 2003, Liebert, Sander wrote: > Date: Mon, 27 Jan 2003 12:54:04 -0600 > From: "Liebert, Sander" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Regular Expression's and punctuation > > I have a script that is used for text messaging. I added a line of code to > check to make

RE: Regular Expression's and punctuation

2003-01-27 Thread Mark Anderson
>I have a script that is used for text messaging. I added a line of code to >check to make sure that input is in a field before the message is sent. My >code is as follows: > >if($b !~ m/^\w[\w\s]*\w$/) { $error .= "Enter a message \n"; } > >This fails if the field has any punctuation characters.

RE: Regular Expression's and punctuation

2003-01-27 Thread Dan Muey
> > I have a script that is used for text messaging. I added a > line of code to check to make sure that input is in a field > before the message is sent. My code is as follows: > > if($b !~ m/^\w[\w\s]*\w$/) { $error .= "Enter a message \n"; } > > This fails if the field has any punctuatio

RE: Regular Expression's and punctuation

2003-01-27 Thread Bob Showalter
Liebert, Sander wrote: > I have a script that is used for text messaging. I added a line of > code to check to make sure that input is in a field before the > message is sent. My code is as follows: > > if($b !~ m/^\w[\w\s]*\w$/) { $error .= "Enter a message \n"; } > > This fails if the field ha