diff --git a/grep.md b/grep.md index c9dc9b021..5d69f3e2e 100644 --- a/grep.md +++ b/grep.md @@ -86,7 +86,7 @@ grep -E "foo|oof" bar.txt # match anything that resembles a URL in # foo.txt and only print out the match -grep -oE "https?:\/\/((\w+[_-]?)+\.?)+" foo.txt +grep -oE "https?://((\w+[_-]?)+\.?)+" foo.txt # can also be used with pipes: # match any line that contains "export" in