com.atlassian.plugin.util
Class RegularExpressions

java.lang.Object
  extended by 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 faciliate composing operations without needing to compile temporary patterns.


Constructor Summary
RegularExpressions()
           
 
Method Summary
static String anyOf(Collection<String> expressions)
          Obtain a regular expression which matches any one of a given collection of expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegularExpressions

public RegularExpressions()
Method Detail

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.


Copyright © 2015 Atlassian. All rights reserved.