Re: [SPAM DETECT] split and grouping in regexp
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 00:41:56 -0500
"XM" == Xavier Mas <xaviermasr@xxxxxx> writes:
XM> A Dimarts 31 Octubre 2006 02:22, Daniel Kasak va escriure:
>> my ( $yyyy, $mm, $dd ) = split /(-|\/)/, $yyyymmdd;
XM> split function can't accept an expression on its syntax, only a
XM> character as separator field.
where did you learn that mistaken fact? it is completely wrong. in fact
it is the opposite, as split ONLY takes a regex for its first arg. you
can't just pass it a string or a char, they are converted to a regex.
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
.
- References:
- split and grouping in regexp
- From: Daniel Kasak
- Re: [SPAM DETECT] split and grouping in regexp
- From: Xavier Mas
- split and grouping in regexp
- Prev by Date: Perl Code Creating a Binary File for MATLAB
- Next by Date: Re: POE performance issue.
- Previous by thread: Re: [SPAM DETECT] split and grouping in regexp
- Next by thread: Re: [SPAM DETECT] split and grouping in regexp
- Index(es):
Relevant Pages
|
|