Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You haven't provided much detail...and no code that you have tried. You are much more likely to get more informative help if you post your code and let others see what you have tried. Search the perlmonks site. Its a great resource. (for example QandASection: regular expressions ) regardless... I'm assuming you have your data in some text file.
here's the data in a text file...
You can try this for a start... I have written the comments next to the pattern match so you can see what's happening at each line. If you want to know what the symbols mean, its better to look at a table of regular expression symbols in perl. There is no other short cut. however, this is only one of ways you could do this. I'm sure people can come up with shorter, fancier and even easier ways to do this kind of pattern match. This why you need to post your code, and provide better problem descriptions... so people can suggest different things, and then you learn much more. perliff
---------------------- -with perl on my side "If you look at the code too long, the code also looks back at you" In reply to Re: Reguar expression
by perliff
|
|