Class RegularExpressions

java.lang.Object
com.atlassian.plugin.util.RegularExpressions

@Internal public class RegularExpressions extends Object
Utility functions for constructing regular expressions. The methods here take and return strings to facilitate composing operations without needing to compile temporary patterns.
  • Constructor Details

    • RegularExpressions

      public RegularExpressions()
  • Method Details

    • anyOf

      public static String anyOf(Collection<String> expressions)
      Obtain a regular expression which matches any one of a given collection of expressions. If the provided collection is empty, a regular expression which matches no string (not even the empty string) is returned.
      Parameters:
      expressions - the individual expressions to compose.
      Returns:
      an expression which matches when any one of expressions matches.