omegaweaponZ has asked for the wisdom of the Perl Monks concerning the following question:
1: 2013-06-01 09:20:43 /stuff_I_want 200
2: 2013-06-01 09:20:43 /stuff_I_want 200
3: 2013-06-01 09:20:43 /stuff_I_dontwant 200
4: 2013-06-01 09:20:43 /stuff_I_want 200
So lets say I only want to keep lines 1,2,4, and delete 3. (The file doesn't have 1,2,3,4, I'm just denoting that line by line). How can I construct a regex to keep only what I want and delete all else from file? But remember, I want the ENTIRE line from the parameter of "stuff_I_want" in the regex. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx Question!
by hbm (Hermit) on Jun 07, 2013 at 21:04 UTC | |
|
Re: RegEx Question!
by CountZero (Bishop) on Jun 08, 2013 at 07:41 UTC | |
by omegaweaponZ (Beadle) on Jun 18, 2013 at 20:25 UTC | |
|
Re: RegEx Question!
by Laurent_R (Canon) on Jun 08, 2013 at 11:22 UTC |