⇤ ← Revision 1 as of 2018-07-03 01:59:38
206
Comment:
|
← Revision 2 as of 2019-01-29 11:38:14 ⇥
385
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
* grep return only the section that match, using perl mode and lookback {{{ echo "123 foo YEA bar ok" > /tmp/test.txt $ grep -oP '(?<=foo )\w+(?= bar)' test.txt YEA }}} |
regex recipies and notes
- Negative regex matching
grep return only the section that match, using perl mode and lookback
echo "123 foo YEA bar ok" > /tmp/test.txt $ grep -oP '(?<=foo )\w+(?= bar)' test.txt YEA
...