Perl pattern matching system variables -
I have a pattern: word1 word2 word3
after pattern Matching with word 1 (using Perl), I have to print 'word2' and 'word3' as described above.
Is there a pattern system variable available to do this? What are the available ways to do so?
Can someone help me?
Thanks in advance Senthil.
If I understand correctly, then you have the value of Word1, and you have the word Want to print two consecutive words after 1?
Try it: M / $ word1 pattern \ s + (? Lt; word2 & gt; \ s +) \ s + (?
should be 2 words and 3 words, and $ + {word2}
And you must match in $ + {word3}
.
If I understand your question for the first time, then it is ...
Comments
Post a Comment