From 2cffa0ccee2a714e8e6be744c3021b84d722ec1c Mon Sep 17 00:00:00 2001 From: Cameron Tod Date: Mon, 11 May 2020 20:57:08 +1200 Subject: [PATCH] ack: add regex, single file search examples (#4007) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Zlatan Vasović Co-authored-by: Starbeamrainbowlabs --- pages/common/ack.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/ack.md b/pages/common/ack.md index 4eccc795fa..b605ac1c47 100644 --- a/pages/common/ack.md +++ b/pages/common/ack.md @@ -19,6 +19,14 @@ `ack -cl {{foo}}` +- Search a file for a specified string: + +`ack bar "{{foo bar}}" {{path/to/file}}` + +- Search a file for the specified regex pattern: + +`ack bar "{{[bB]ar \d+}}" {{path/to/file}}` + - List all valid types: `ack --help=types`