[CentOS] OT: grep regex pointer appreciated

Bill Campbell centos at celestial.com
Mon Mar 7 17:55:26 UTC 2011

On Mon, Mar 07, 2011, Robert Grasso wrote:

>On my opinion, grep is not powerful enough in order to achieve what you
>want. It would be preferable to use at least some (old but powerful) tools
>such sed, awk, or even better : perl. Actually, what you need is a tool
>providing a capture buffer (this is perl jargon - "back references" in sed
>jargon) in which you can get the string you want to extract, rather than
>trying to build up a positive matching regex, as the string boundaries seem
>to be easy enough to describe with regexs.

One can use pcregrep which is grep that groks perl regular

INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

If the government can take a man's money without his consent, there is no
limit to the additional tyranny it may practise upon him; for, with his
money, it can hire soldiers to stand over him, keep him in subjection,
plunder him at discretion, and kill him if he resists.
	Lysander Spooner, 1852

More information about the CentOS mailing list