GavinW_29074
Dec 08, 2011Nimbostratus
Extract value from VirtualName
Hi there,
I'm trying to write an iRule condition that needs to know part of the [Virtual Name] value...
A couple of examples are:
/Common/Test.App/app.test.com_https
/Common/app2.test.com_http
I want to get the bit between the last '/' and the '_'...
I've tried using the scan command as follows:
scan $virtualname {%*[^/]/%[^_]} vname
log local0. "\$vname = $vname"
However I keep getting: can't read "vname": no such variable while executing "log local0. "\$vname = $vname""
Any ideas???
Or is there a better way of doing it?
Cheers
Gav