
cuboidgraphix
User
Mar 23, 2009, 2:36 PM
Post #1 of 4
(2486 views)
|
How to match a similiar word in the line and parse that word?
|
Can't Post
|
|
Hi guys, Been a while since I been in here ... really need ya'lls help again. I have an output assigned as an array variable. I have stripped the array of it's '\n' and I'm now trying to process the line. What I'm trying to do, is try to match a particular string in the line, and parse the word in that line. For eg: I want to match a date.. $date = '090323'; to the line.. $data = "R081110000002JF R090323000450JF R081112000045JF R081210000077JF"; Now I would like my output to be.. R090323000450JF after it's been matched and parsed. So far I have this..
if($data =~ /R$date/){ $word = substr($data,0,0); # This is where I'm stuck. print $word; } Fish ... Kevin... can any of you guys help me here?
|