xingjin3131 has asked for the wisdom of the Perl Monks concerning the following question:
I want to pick the header part from Test to 138 end. so I did like this:Test 1 of 1 bala bala bala. bala 138 end blah blah
But somehow, when I tried to print @tmpHeader part, I got nothing. Can someone help me with this? Thanks a lot, Xing@tmpHeader = grep /^Test\s+\d+\s+of\s+\d+$/../^\d+\s+end$/, @allData;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep using regex
by ikegami (Patriarch) on Mar 01, 2009 at 21:12 UTC | |
|
Re: grep using regex
by ysth (Canon) on Mar 02, 2009 at 00:07 UTC | |
|
Re: grep using regex
by toolic (Bishop) on Mar 01, 2009 at 21:53 UTC | |
|
Re: grep using regex (grepping with a regex)
by ww (Archbishop) on Mar 01, 2009 at 21:50 UTC | |
|
Re: grep using regex
by leslie (Pilgrim) on Mar 02, 2009 at 05:09 UTC |