Ghostdog74, that was exactly my point about regular expressions being potentially too inclusive.
By matching only valid characters (or avoiding invalid characters) you reduce issues later.
Example, to search for test followed by any number(including zero) of any character (excluding spaces and \ characters), followed by a .iso:
sed -i.bak 's/test[^ \]*\.iso/test0123-new.iso/' test.vmx
As we only want to exclude spaces and \ characters, this is shorter than my previous example, while still only finding valid matches.
If you want to match a full stop you need to escape it (using \) EG: \.
Last edited by Disillusionist; 07-20-2008 at 06:15 AM.