This would replace all occurances of foo with bar in file baz backing up the original (unalterd file) to baz.bakperl -i.bak -lpe 's/foo/bar/g;' baz
In reply to Re: Regex to find/replace in a file
by yodabjorn
in thread Regex to find/replace in a file
by amarceluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |