in reply to Newbie regular expressions question

The requirement is not entirely clear (and there is a contradiction between your description of the need and the code you show), but a simple correction to your Perl one-liner could be something like this:
perl -pi.bak -e 's/ip-compute-[\d.]{7,15}-internal/ip-compute-10.25.25 +.25-internal/g' test.txt
Since I am not sure of what you need exactly, this is an example of running this command showing what it does:
$ cat test.txt text.txt yoda yoda yoda ip-compute-10.10.10.1-internal yadda yadda yadda some more stuff $ perl -pi.bak -e 's/ip-compute-[\d.]{7,15}-internal/ip-compute-10.25. +25.25-internal/g' test.txt $ cat test.txt text.txt yoda yoda yoda ip-compute-10.25.25.25-internal yadda yadda yadda some more stuff
Please note that this is a very very naive approach to IP address matching and that the [\d.]{7,15} pattern is only looking for any combination of 7 to 15 digits and dots. It might match many things other than IP addresses, such as a phone number (read carefully davido's caveats on the subject in his post above). In this specific case, however, one might argue that it is relatively safe to use this because the words "ip-compute-" and "-internal" coming respectively immediately before and after the numbers-and-dots matching part are making false matching relatively unlikely, but you are the only one to know the real content of the file you want to process and you are therefore the only one to be able to know whether this will be sufficient. If you need the match to be more selective, then you run into exactly the kind of problem that davido is describing: we probably don't want to reinvent the wheel.