On Mon, Feb 2, 2009 at 11:58 AM, Ben Scott <dragonh...@gmail.com> wrote:
> On Mon, Feb 2, 2009 at 11:46 AM, Alan Johnson <a...@datdec.com> wrote:
>>        -o, --only-matching
>>               Print  only  the  matched  (non-empty) parts of a matching
>> line, with each such part on a separate output line.
>
>  Oh.  Hey, that's neat; I didn't know about that one.  So Kenta could
> -- possibly -- do this:
>
>        grep -o -E [[:xdigit:]]+
>
> However, that will generate false positive matches on anything that
> happens to match a hex digit and isn't within Kenta's field delimiters
> (colon and backslash).  May or may not be an issue, depending on what
> "foo" and "bar" really are.  And you can't use any kind of delimiter
> matching without also including the delimiters in the output with
> grep, can you?

Actually I need to get the info regardless of delimiters so matching
any hex digits of a certain length works for me.  I'd sent an e-mail
before but I used the wrong address so maybe it didn't go through, for
som reason the gnu-port of grep for win32 has no -o option. :(

-Kenta
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to