Replace spaces within a substring : Thanks in advance.
I want to replace the spaces in a particular string with some other char like '_' or '~' or maybe just remove the spaces but only for the substring between certain charecters like '<>' or '" "'. eg.

config snmp trapreceiver create <community name> <trap receiver IP>

should become :

config snmp trapreceiver create <community_name> <trap_receiver_IP>

Any help will be appreciated.