diff --git a/ack b/ack index 0a256af2..f0c2c1dd 100755 --- a/ack +++ b/ack @@ -2395,6 +2395,7 @@ mailing list. How appropriate to have Inowledgements! Thanks to everyone who has contributed to ack in any way, including +Yaroslav Halchenko, Thiago Perrotta, Thomas Gossler, Kieran Mace, diff --git a/dev/Cookbook.pm b/dev/Cookbook.pm index 369e5a22..4b1ca0a0 100644 --- a/dev/Cookbook.pm +++ b/dev/Cookbook.pm @@ -167,7 +167,7 @@ If your desired pattern begins with one word and ends with another, C<-w> is sti If your desired pattern starts or ends (or both) with punctuation, using C<-w> may be erroneous. ack will warn you in this case. If you get a warning about C<-w>, Say What You Mean (SWYM). If you mean the start of your pattern with punctuation should be -at the beginning of line B preceeded by a word OR by a space (or tab etc), before the needed punctuation, +at the beginning of line B preceded by a word OR by a space (or tab etc), before the needed punctuation, SWYM as C<(?:^|\b|\s)#+\s+(.*)> which will find and capture a comment. (Try it plain, with C<-o>, and with C<--output='$1'>, which has its own section below) @@ -256,11 +256,11 @@ Note, this requires L plug =head1 EXAMPLES OF C<< --output >> -The C<-o> and C<< --output expr >> options allow for specifying and formating the output. +The C<-o> and C<< --output expr >> options allow for specifying and formatting the output. With look-behind and look-ahead, one "match without matching" for highlighting or C<-o>) purposes. The regex C<< abc\K(def)(?=ghi) >> will highlight ONLY C in the text, \ -but only if that string is preceeded by C and C follows. +but only if that string is preceded by C and C follows. With C<-o>, it will output C but only when found in context of CB<>>C. HT to L @@ -578,7 +578,7 @@ If the files aren't in nor wanted in sorted order, the shell command or alias ne with modern C's C<< <() >> command substitution as file-pipes. -(That C<< <(fileter $f1) <(filter $f2) >> idiom is also good for pre-filtering input to C etc.) +(That C<< <(filter $f1) <(filter $f2) >> idiom is also good for pre-filtering input to C etc.) Note for Windows users: Microsoft and Cygwin both provide Linux/GNU commandline utilities for Windows. They may have come with the Perl you're using for Ack.