[Cialug] PerlRE

Jerry Heiselman jweida at gmail.com
Sun Sep 2 14:48:46 CDT 2007


On 9/2/07, Eric Junker <eric at eric.nu> wrote:
> Todd Walton wrote:
> > But how do I yank and return just "We go to the " out of it?
>
> Depending on how exact you need your output, grep might be sufficient.
>
> grep "We go to the" file.txt
>
> Eric
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>

Try:

perl -nle "/(We go to the \w)/ && print $1"

-- 
Jerry H
jweida [-at-] gmail [-dot-] com


More information about the Cialug mailing list