in reply to
split with regex
How about this:
split (/(\d{2}\:\d{2}\:\d{2})/, $data);
[download]
Comment on
Re: split with regex
Download
Code
Replies are listed 'Best First'.
Re: Re: split with regex
by
Emanuel
(Pilgrim)
on Nov 01, 2002 at 14:13 UTC
the problem here is that it rips off the leading digits, but I do need them.. and that's my dilemma, that I can't seem to find a proper regex for this.
[reply]
Re: Re: Re: split with regex
by
Jaap
(Curate)
on Nov 01, 2002 at 15:20 UTC
No it does not, because the regex is surrounded by (). The time is stored in a separate array element.
[reply]
In Section
Seekers of Perl Wisdom