I have a file that looks like this:
text.txt yoda yoda yoda ip-compute-10.10.10.1-internal yadda yadda yadda some more stuff ###########
I need to replace ip*[internal] with ip-compute-10.25.25.25-internal.
This does not work:
perl -p -i.bak -e 's/\ip*\internal/ip-10.10.10.1-internal/g' text.txt
In reply to Newbie regular expressions question by bayareamonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |