RobC
Oct 25, 2016Nimbostratus
Regex for parsing LDAP attribute string value
I'm trying to pull a specific variable from an LDAP string attribute. The attribute is proxyAddresses, I need the value of "SMTP:" (case sensitive). I'm using the variable assign option in the VPE. Here is the crappy expression I'm using to create the session.custom.sso.smtp session variable.
session.custom.sso.smtp = expr { [lindex [split [mcget {session.ad.last.attr.proxyAddresses}] "SMTP:"] 1] }
I'm only getting 3 character of the attribute. Here is a sample of the proxyAddress attribute contents;
| sip:ROCKKI@rockservices.com | smtp:ROCKKI@rockservices.appacheonline.com | smtp:Kid_Rock@rockservices.com | smtp:Kid.Rock@rockservices.com | SMTP:ROCKKI@rockservices.com |
Thx