diff options
author | Gregory <chmln@users.noreply.github.com> | 2020-07-03 12:01:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 12:01:44 -0400 |
commit | 987373bdb11b1ddbbe3287b8880e4595c50c18f9 (patch) | |
tree | 7d10211b737c382a398ed3ce77d9929f4a998615 | |
parent | d3aa277628b8b91e794aa7bc8ee86dee92863ab2 (diff) | |
parent | e9e3a4d32681e4ac0713187e698eb73679ccb27c (diff) |
Merge pull request #66 from rstacruz/patch-1
Readme: fix the sed slashes example
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -37,7 +37,7 @@ Some cherry-picked examples, where `sd` shines: - Extracting stuff out of strings containing slashes: - sd: `echo "sample with /path/" | sd '.*(/.*/)' '$1'` - sed: use different delimiters every time depending on expression so that the command is not completely unreadable - - `echo "sample with /path/" | sed -E 's/.*(/.*/)/\1/g'` + - `echo "sample with /path/" | sed -E 's/.*(\\/.*\\/)/\1/g'` - `echo "sample with /path/" | sed -E 's|.*(/.*/)|\1|g'` - In place modification of files: - sd: `sd before after file.txt` |