cornelius80 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I have a $line as such:
I am trying to split the string such that I will obtain the following in an array:A::B:123-456 hh:mm:C::D:789
I have tried @array=split(/:/,$line); but the problem I am facing is that the hh:mm gets "caught in the action" too,ie.A B 123-456 hh:mm C D 789
What are your advice, please? Kind Regards, CorneliusA B 123-456 hh mm C D 789
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to split unique patterns
by Corion (Patriarch) on Jun 10, 2013 at 08:41 UTC | |
by reisinge (Hermit) on Jun 10, 2013 at 14:15 UTC | |
by Corion (Patriarch) on Jun 10, 2013 at 14:35 UTC | |
by cornelius80 (Initiate) on Jun 10, 2013 at 08:55 UTC | |
by Corion (Patriarch) on Jun 10, 2013 at 09:15 UTC | |
by cornelius80 (Initiate) on Jun 10, 2013 at 09:24 UTC | |
by Corion (Patriarch) on Jun 10, 2013 at 09:37 UTC | |
| |
by AnomalousMonk (Archbishop) on Jun 10, 2013 at 14:08 UTC | |
Re: How to split unique patterns
by hdb (Monsignor) on Jun 10, 2013 at 08:45 UTC |
Back to
Seekers of Perl Wisdom