Checking for regex match of attribute values in a script

Wessel, Keith kwessel at illinois.edu
Wed Feb 21 11:23:36 EST 2018


Hi, all,

We've got a scripted attribute definition that checks for several values of memberOf with memberOf.getValues().contains(). I'd like to convert this to use a regex to match partial group names. But I can't seem to get contains to use a regex, and based on the method definition, I'm not sure that's how it should be done. I've tried putting the parameter to contains() inside slashes instead of quotes as well as just putting the regex in place of the string inside the quotes, neither of which I suspected would work.

Is there a way to do a regex match on attribute values with contains()? Or do I need to iterate through the attribute values with a loop to do this comparison? Or is there another method on collections that I should be using other than contains()?

Thanks,
Keith



More information about the users mailing list