For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2007 > Pattern Matching and Extraction









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pattern Matching and Extraction
doni

2007-01-22, 6:58 pm

Hi,

I am writing a program where based upon an user input, I perform a
pattern match to extract the user input from the file. If there is a
match then I would like to print the 4th and 5th field of the next line
from where the pattern match occured. Can anyone let me know how can I
perform this.

Here is how the data is represented in the file.

Name
-> Address1 Address2 City ZipCode
Name
-> Address1 Address2 City ZipCode
Name
-> Address1 Address2 City ZipCode
Name
-> Address1 Address2 City ZipCode
Name
-> Address1 Address2 City ZipCode

Thanks,
doni

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com