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,
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
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
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
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
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