Aaryan has asked for the wisdom of the Perl Monks concerning the following question:
I am new to perl and hence this simple query.
I want to parse a string described as below to get the value '0x2f7c'.
1:05:02.599,xx:MTV = 0x2f7c:COOL_CALL, an option = 11
Please note:
a) '1:05:02.599' and '0x2f7c' are dynamic, which means to say, it keeps changing and which is not constant in the file. In other words, I can't grep these values from my code.
b) ":COOL_CALL, an option" is static, which I can use/grep from my code.
So monks can you help me as how to go about this problem? Thankz in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing of a string
by davido (Cardinal) on Mar 11, 2005 at 07:07 UTC | |
|
Re: Parsing of a string
by ikegami (Patriarch) on Mar 11, 2005 at 07:06 UTC | |
|
Re: Parsing of a string
by saintmike (Vicar) on Mar 11, 2005 at 07:24 UTC | |
|
Re: Parsing of a string
by sh1tn (Priest) on Mar 11, 2005 at 08:49 UTC | |
|
Re: Parsing of a string
by perlsen (Chaplain) on Mar 11, 2005 at 09:34 UTC | |
|
Re: Parsing of a string
by rev_1318 (Chaplain) on Mar 11, 2005 at 10:10 UTC | |
by ww (Archbishop) on Mar 11, 2005 at 14:45 UTC | |
|
Re: Parsing of a string
by Random_Walk (Prior) on Mar 11, 2005 at 11:27 UTC | |
|
Re: Parsing of a string
by Aaryan (Initiate) on Mar 11, 2005 at 11:24 UTC |