Re: Regex Consult

2003-06-13 Thread Robin Norwood
Peter Fleck <[EMAIL PROTECTED]> writes: > >Peter Fleck [mailto:[EMAIL PROTECTED] > >: > >: ( > >: $date=~/^((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4})))($|(,(\s*) > >: ((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4}+$)/ > >: ) > > > > What about split: > > > >my @dates = split m#/|,\s*#, 'mm/dd/yy,

RE: Regex Consult

2003-06-12 Thread Peter Fleck
Peter Fleck [mailto:[EMAIL PROTECTED] : : ( : $date=~/^((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4})))($|(,(\s*) : ((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4}+$)/ : ) What about split: my @dates = split m#/|,\s*#, 'mm/dd/yy, mm/dd/yy'; printf "Dates retrieved: %s\n", @dates / 3; Bit late in res

RE: Regex Consult

2003-06-04 Thread Charles K. Clarkson
Peter Fleck [mailto:[EMAIL PROTECTED] : : ( : $date=~/^((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4})))($|(,(\s*) : ((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4}+$)/ : ) What about split: my @dates = split m#/|,\s*#, 'mm/dd/yy, mm/dd/yy'; printf "Dates retrieved: %s\n", @dates / 3; HTH, Cha

Re: Regex Consult

2003-06-04 Thread James Edward Gray II
On Tuesday, June 3, 2003, at 12:59 PM, Peter Fleck wrote: And is there a way to make the regex more readable with line breaks that don't become part of the expression? Sure. m/ \w+ # one or more word chararcters \s{2} # two whitespace characters \d+ # one or more

Re: Regex Consult

2003-06-04 Thread Jenda Krynicky
From: Peter Fleck <[EMAIL PROTECTED]> > The regex that follows is working the way I want it too (at least in > my tests). I'm looking for feedback on better ways to write it. In > particular, is there a shortcut to repeating my 'basic component' > listed below? And is there a way to make the regex

Regex Consult

2003-06-04 Thread Peter Fleck
The regex that follows is working the way I want it too (at least in my tests). I'm looking for feedback on better ways to write it. In particular, is there a shortcut to repeating my 'basic component' listed below? And is there a way to make the regex more readable with line breaks that don't