Is regex supported in Okta's Expression Language? Skip to main content
https://support.okta.com/help/answers?id=906f0000000i08cias&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
DexMedia B2B Mobile App Test UserDexMedia B2B Mobile App Test User 

Is regex supported in Okta's Expression Language?

I need to pull an attribute out of AD and map to Okta's user profile, but I only want to map it if the first char is vzVZ and the next 6 chars are a digit like: ^[vzVZ]{1}[0-9]{6}$
Okta Service AccountOkta Service Account
Hi, Thanks. And it’s documented in the support.okta.com ? Regards,
Marc JohnstonMarc Johnston (Okta, Inc.)
Hi Thibault,

Going to support.okta.com and searching for regex turns up this page:

http://developer.okta.com/docs/api/getting_started/okta_expression_lang

Thank You
Marc
Okta Support
Okta Service AccountOkta Service Account
On this page, the only reference to regex is: isMemberOfGroupNameRegex and no doc on how to use regex with Okta attribute mapping. Can you advise?
Okta Service AccountOkta Service Account
And how to use regex in attribute mapping? e.g. for the okta login mapping? Regards, Thibault Crevel
Okta AgentOkta Agent
If I want to test an attribute against a regex in attribute mapping (in the tertiary expression) to insure that it's yyyy-mm-dd, what's the syntax? For example, I want to check if a certain field is in ISO date format /(\d{4})-(\d{2})-(\d{2})/ how do I form the tertiary expression, e.g., 

user.hireDate regex '/^(\d{4})-(\d{2})-(\d{2})$/' ? user.hireDate : null
Daniel BrightDaniel Bright
I agree with Thibault, there is no real documentation on regex other than the fact that it can be used in "some capacity". I say some capacity because we are left guessing as to which flavor of regex can be used, for example, I am trying to create a group filter value of type regex, and I'm able to do it, but I'm having to fumble through. If there was even a link to a regex spec we could use it would be great. 

Thanks