Forum Discussion
iRule regex to normalize phone numbers?
Getting ready to test this in a few minutes, hopefully it will be the solution we need. :)
when ACCESS_POLICY_AGENT_EVENT { expr srand([clock clicks]) set otp [string range [format "%08d" [expr int(rand() * 1e9)]] 1 6 ] set mail [ACCESS::session data get "session.ldap.last.attr.mail"] set mobile [ACCESS::session data get [string map {"." "" " " "" "-" "" "(" "" ")" "" "+" ""} "session.ldap.last.attr.mobile"]]
ACCESS::session data set session.user.otp.pw $otp ACCESS::session data set session.user.otp.mobile $mobile ACCESS::session data set session.user.otp.username [ACCESS::session data get "session.logon.last.username"] }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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