Checking for regex match of attribute values in a script

Cantor, Scott cantor.2 at
Wed Feb 21 11:31:44 EST 2018

> 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()?

The Java collection method "contains" doesn't support anything but exact match.

Nothing will avoid iteration because the collection type doesn't do anything that would allow for any other comparison to happen at less than O(n) performance.

There are some functional idioms in Java 8 or the Guva library we include that make the syntax nicer but getting them to work in Javascript would be at least somewhat painful the first time.

-- Scott

More information about the users mailing list