Regular Expression confusion
From: Christie Taylor (c.taylor_at_no.spam)
Date: 10/31/04
- Next message: John Bokma: "Re: Regular Expression confusion"
- Previous message: Martien Verbruggen: "Re: Image data parsing"
- Next in thread: John Bokma: "Re: Regular Expression confusion"
- Reply: John Bokma: "Re: Regular Expression confusion"
- Reply: John Bokma: "Re: Regular Expression confusion"
- Reply: Matt Garrish: "Re: Regular Expression confusion"
- Reply: Bob Walton: "Re: Regular Expression confusion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 21:05:51 -0400
I'm new to regular expressions and am trying to create a fairly simple
one to validate input. The goal is to accept an optional word followed
by zero or one spaces, then a required number of 1 to 8 digits.
I tried m/^word\s{0,1}\d{1,7}/i to get started (ignoring my optional
part) but this is not working, it's matching on way too much. What am I
missing?
Thanks!
- Next message: John Bokma: "Re: Regular Expression confusion"
- Previous message: Martien Verbruggen: "Re: Image data parsing"
- Next in thread: John Bokma: "Re: Regular Expression confusion"
- Reply: John Bokma: "Re: Regular Expression confusion"
- Reply: John Bokma: "Re: Regular Expression confusion"
- Reply: Matt Garrish: "Re: Regular Expression confusion"
- Reply: Bob Walton: "Re: Regular Expression confusion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|