Forum Discussion
Nader_125543
Nimbostratus
Sep 05, 2013APM/TCL question, how to replace the fouth octet in network address which include subnet
I have a variable which I inquiry from AD, the variable is in form of x.x.x.x/255.255.255.0 - I need to replace the fourth octet with "0", normally it is set to .254 I have tried this but it does not...
JRahm
Admin
Sep 06, 2013I haven't messed with expressions too much in APM, so I'm not sure if string map is supported in them, but if it is, string map should work:
% set x 10.10.10.254/255.255.255.0
10.10.10.254/255.255.255.0
% string map ".254 .0" $x
10.10.10.0/255.255.255.0
keep in mind this will match any occurrence of .254, so if there is a chance it will show in the 2nd or 3rd octet you'll need to interrogate a little deeper.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects