filter match in line sed
For using match in sed replacement, just border it with '\(' and '\)':
echo Before123 | sed 's/Before\([0-9]*\)/\1After/g'
123After # number is matched withtin '\( \)' and replaced in '\1'
Example with 2 match replacements
echo a_b | sed 's/\(^.*\)_\(.*$\)/first is \1 and \2 is after/g'
Also in C++:
- find jpg or png
- mplayer ubuntu
- composer uninstall
- git check differences between two projects
- How to export a GPG private key to a file
- list apt installed programs
- remove origin git
- install angular 9.1.7
- install npm packages on shared hosting
- ubuntu large text
- install easyadmin-bundle symfony
- gitlab asking for password every time
- rsync only updated files
- udpate node terminal windows
- configure epel repo rhel 8
- git new branch push to remote
- uninstall en_web_core md
- how to wget on windows
- how to search in directory files in ubuntu
- git merge abort
- deno bundler
- cmdchange directory with space
- App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
- how to install intellij in mac