RE: Reg Expression Help

2006-03-23 Thread lim Ee Wah
Hi, I think you should escape that period and dash as well.'^[a-zA-Z0-9-_. \[\]]+$''^[a-zA-Z0-9\-_\. \[\]]+$'or may be simpler:'^[\w\d_\-\. \[\]]+$' ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://list

RE: Reg Expression Help

2006-03-23 Thread Joe Discenza
Scott Purcell wrote, on Thursday, March 23, 2006 3:05 PM   : '^[a-zA-Z0-9-_. ]+$'   The others helped you get [] in there. But hyphen (dash) has to be first, or it looks like a range operator. So try:   ^[-a-zA-Z0-9_. \[\]]+$   Good luck,   Joe   ___

RE: Reg Expression Help

2006-03-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
  -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Scott PurcellSent: Thursday, March 23, 2006 12:05To: Perl-Win32-Users@listserv.ActiveState.comSubject: Reg _expression_ Help Hello,   I have a regular _expression_ in which I a

RE: Reg Expression Help

2006-03-23 Thread Bullock, Howard A.
Scott wrote: How can I incorporate the possibility of having a [ or ] in the user input? /^[a-zA-Z0-9-_. \[\]]+$/ ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysub

Reg Expression Help

2006-03-23 Thread Scott Purcell
Hello,   I have a regular _expression_ in which I am ensuring the user enters some valid characters for our system. Currently the _expression_ is so: '^[a-zA-Z0-9-_. ]+$' Meaning, a user can enter a-z or A-Z or 0-9, dashes, underbars or periods and space.   I have a problem now, bec

RE: Reg Expression Help

2006-03-23 Thread Dirk Bremer
TECTED] On Behalf Of Scott Purcell Sent: Thursday, March 23, 2006 14:05 To: Perl-Win32-Users@listserv.ActiveState.com Subject: Reg Expression Help Hello, I have a regular expression in which I am ensuring the user enters some valid characte

RE: Reg. expression help

2005-02-16 Thread Gerber, Christopher J
-Original Message- > Can someone help me with the syntax of deleting the last word of text string. > i.e. $string = 'my abc 123' > Like to have only 'my abc' David, Quick and easy: $string = 'my abc 123'; $string =~ s/\s+\S+$//; This assumes that you are replacing one or more whitespac

Re: Reg. expression help

2005-02-16 Thread Сергей Черниенко
Hello David, Wednesday, February 16, 2005, 5:26:22 PM, Вы написали: HD> Hi, HD> Can someone help me with the syntax of deleting the last word of text HD> string. HD> i.e. $string = 'my abc 123' HD> Like to have only 'my abc' use strict; my $string = 'my abc 123'; $_ = $string; my @string = spl

Re: Reg. expression help

2005-02-16 Thread Ing. Branislav Gerzo (mail-lists)
Hsu, David [HD], on Wednesday, February 16, 2005 at 10:26 (-0500) thoughtfully wrote the following: HD> Can someone help me with the syntax of deleting the last word of text HD> string. HD> i.e. $string = 'my abc 123' HD> Like to have only 'my abc' my $string = 'my abc 123 f '; $string =~ s/(.*)\

RE: Reg. expression help

2005-02-16 Thread Peter Eisengrein
han the array slice. Lucky for me, since I would normally use the regex! > -Original Message- > From: Hsu, David [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 16, 2005 10:26 AM > To: perl-win32-users > Subject: Reg. expression help > > > Hi, > Can

RE: Reg. expression help

2005-02-16 Thread Tom Pollard
On Wed, 16 Feb 2005, Erich Beyrent wrote: > > Can someone help me with the syntax of deleting the last word of text > string. > > i.e. $string = 'my abc 123' > > Like to have only 'my abc' > > #!/usr/bin/perl > > $string = 'some string'; > $string =~ s/(?<=\s)(.*?)$//g; > > print "String = $st

Recall: Reg. expression help

2005-02-16 Thread Hsu, David
Hsu, David would like to recall the message, "Reg. expression help". ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Reg. expression help

2005-02-16 Thread Erich Beyrent
> Hi, > Can someone help me with the syntax of deleting the last word of text string. > i.e. $string = 'my abc 123' > Like to have only 'my abc' > > Thanks, > David #!/usr/bin/perl $string = 'some string'; $string =~ s/(?<=\s)(.*?)$//g; print "String = $string\n"; HTH -Erich- _

Reg. expression help

2005-02-16 Thread Hsu, David
Hi, Can someone help me with the syntax of deleting the last word of text string. i.e. $string = 'my abc 123' Like to have only 'my abc' Thanks, David ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://l