Forum Discussion
NoamRotter_1534
Nimbostratus
Jan 12, 2017APM variable assign and if statement
I want to change a variable caught by the APM.
The current var: session.logon.last.domain = local.domain
I want to replace it if the session.logon.last.domain is local.domain to somethin...
Stanislas_Piro2
Cumulonimbus
Jan 16, 2017Hi,
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.
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