This commit is contained in:
Morgan 2020-02-12 22:30:25 +01:00 committed by GitHub
parent 977b79f8f4
commit 4ae3a36ad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

6
cheat/regex.md Normal file
View File

@ -0,0 +1,6 @@
### Print only the captured group ([src](https://unix.stackexchange.com/a/13472/220566))
Example with expression `key=value toast=pain hello=bonjour`
if you want to capture only what comes after `key=`, you can use :
`grep -oP 'key=\K\w+'`