grep: slashes do not need backslashes (#1899)

This commit is contained in:
tripleee 2022-11-01 05:13:54 +02:00 committed by GitHub
parent 655647d5d4
commit 1a0c86e002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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