Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

APM variable assignment




I am using client certificate crldp to authorise people.

What I want to do is extract the email from the subject and assign it to



This is what I have come up with - with some googling. not sure if its the best approach


expr { [lindex [regexp -inline {emailAddress=([^, \\\r]*)} [mcget session.ssl.cert.subject]] 1] }



I think if I could use findstr or substr it would be better but I can't seem to call those functions - looks like they are irule and not tcl.


I'm guessing - i found string trim, i could use that but I couldn't get it to work I think because the 2nd arg is char not string !


so then i found string range


so maybe

string range [mcget session.ssl.cert.subject] <> end


not sure what to put in <> to find the position of the string


again back to string trim

has an example that makes it look like the second parameter takes a string.