Re: grep

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Cluff
Date:  
To: Main PLUG discussion list
Subject: Re: grep
Better to have too much info, too many replies, than not enough...
Unless you bury an answer about grep in the middle of war and peace.

Brian Cluff

On 08/24/2014 02:53 PM, Jon Kettenhofen wrote:
> Brian's is a better answer
>
> On 08/24/2014 05:48 PM, Brian Cluff wrote:
>> It tells grep to use the Extended regular expressions. Further down in
>> the man page for grep it defines the various regular expressions as:
>>
>> "grep understands three different versions of regular expression syntax:
>> “basic” (BRE), “extended” (ERE) and “perl” (PRCE). In GNU grep, there is
>> no difference in available functionality between
>> basic and extended syntaxes. In other implementations, basic regular
>> expressions are less powerful. The following description applies to
>> extended regular expressions; differences for basic
>> regular expressions are summarized afterwards. Perl regular expressions
>> give additional functionality, and are documented in pcresyntax(3) and
>> pcrepattern(3), but only work if pcre is available
>> in the system."
>>
>> So the current versions of grep treat the basic and extended regular
>> expressions as the same, so if they aren't powerful enough you will want
>> to use the -P flag to get the PERL regular expressions.
>>
>> Here's a good web page that will show you the differences between basic
>> and extended regular expressions:
>> http://www.regular-expressions.info/posix.html
>>
>> Brian Cluff
>>
>> On 08/24/2014 02:21 PM, Michael Havens wrote:
>>> what does the -E option do. The man page leaves much to be desired....
>>> :-)~MIKE~(-:
>>>
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss