Forum Discussion
Stanislas_Piro2
Jan 16, 2017Cumulonimbus
Hi,
the code provided by Kai is good and working fine.
I think you can change the other part of the variable assign with regex
if {[regexp {othername:UPN<[^@]+@([^>]+)>} [mcget {session.ssl.cert.x509extension}] UPNFull current_domain]} {
if { $current_domain equals "local.domain" } then {
return "abc.remote" ;
} else {
return $current_domain ;
} ;
} else {return ""}
regex is almost every time worse than string compare like equals, but with split, foreach, string first commands, but regex is better than this code.