<p>
An array of <a>RegexPatternSetSummary</a> objects.
</p>

@param regexPatternSets
An array of <a>RegexPatternSetSummary</a> objects.
972473
public void setRegexPatternSets(java.util.Collection<RegexPatternSetSummary> regexPatternSets) {
        if (regexPatternSets == null) {
            this.regexPatternSets = null;
            return;
        }

        this.regexPatternSets = new java.util.ArrayList<RegexPatternSetSummary>(regexPatternSets);
    }
996462
public static WildcardPatternMatcher compile(String patterns) {
		if(patterns == null || patterns.isEmpty()) {
			return matchNone;
		} else {
			List<String> list = StringUtility.splitStringCommaSpace(patterns);
			// Match none shortcut
			if(list.isEmpty()) return matchNone;

			// Parse into a series of individual matchers
			final List<WildcardPatternMatcher> matchers = new ArrayList<>(list.size());
			for(String pattern : list) {
				int end = pattern.length();
				if(end > 0) {
					// Beginning wildcards
					int pos = 0;
					final boolean startsWildcard;
					if(pattern.charAt(0) == '*') {
						startsWildcard = true;
						pos++;
						// Skip consecutive beginning
						while(pos < end && pattern.charAt(pos) == '*') pos++;
						if(pos >= end) {
							// Is any number of '*' only, matchAll shortcut
							return matchAll;
						}
					} else {
						startsWildcard = false;
					}
					// Ending wildcards
					final boolean endsWildcard;
					if(pattern.charAt(end - 1) == '*') {
						endsWildcard = true;
						end--;
						// Skip consecutive ending
						while(end > pos && pattern.charAt(end - 1) == '*') end--;
						assert end > pos;
					} else {
						endsWildcard = false;
					}
					// Split the remaining pattern on any internal '*'
					final List<String> sequences = new ArrayList<>();
					while(pos < end) {
						assert pattern.charAt(pos) != '*';
						int starPos = pattern.indexOf('*', pos + 1);
						if(starPos == -1 || starPos >= end) {
							// Not more '*' found
							sequences.add(pattern.substring(pos, end));
							pos = end;
						} else {
							// Found
							sequences.add(pattern.substring(pos, starPos));
							pos = starPos + 1;
							// Skip consecutive
							while(pos < end && pattern.charAt(pos) == '*') pos++;
						}
					}
					int seqCount = sequences.size();
					assert seqCount >= 1;
					if(seqCount == 1) {
						final String sequence = sequences.get(0);
						if(startsWildcard) {
							if(endsWildcard) {
								// *infix*
								matchers.add(
									new WildcardPatternMatcher() {
										@Override
										public boolean isMatch(String paramName) {
											return paramName.contains(sequence);
										}
									}
								);
							} else {
								// *suffix
								matchers.add(
									new WildcardPatternMatcher() {
										@Override
										public boolean isMatch(String paramName) {
											return paramName.endsWith(sequence);
										}
									}
								);
							}
						} else {
							if(endsWildcard) {
								// prefix*
								matchers.add(
									new WildcardPatternMatcher() {
										@Override
										public boolean isMatch(String paramName) {
											return paramName.startsWith(sequence);
										}
									}
								);
							} else {
								// exact
								matchers.add(
									new WildcardPatternMatcher() {
										@Override
										public boolean isMatch(String paramName) {
											return paramName.equals(sequence);
										}
									}
								);
							}
						}
					} else {
						matchers.add(
							new WildcardPatternMatcher() {
								@Override
								public boolean isMatch(String paramName) {
									int index = 0;
									int indexEnd = sequences.size();
									int pos = 0;
									int end = paramName.length();
									// Handle non-wildcard start
									if(!startsWildcard) {
										String prefix = sequences.get(0);
										if(!paramName.startsWith(prefix)) {
											return false;
										}
										index++;
										pos += prefix.length();
									}
									// Handle non-wildcard end
									if(!endsWildcard) {
										indexEnd--;
										String suffix = sequences.get(indexEnd);
										if(!paramName.endsWith(suffix)) {
											return false;
										}
										end -= suffix.length();
									}
									// Check if overlapping prefix and suffix matches
									if(end < pos) return false;
									// Handle any remaining infixes
									while(index < indexEnd) {
										String sequence = sequences.get(index++);
										int sequenceLen = sequence.length();
										assert sequenceLen > 0;
										int foundAt = paramName.indexOf(sequence, pos);
										if(foundAt == -1 || foundAt > (end - sequenceLen)) {
											return false;
										}
										pos += sequenceLen;
									}
									return true;
								}
							}
						);
					}
				}
			}
			if(matchers.isEmpty()) {
				return matchNone;
			}
			if(matchers.size() == 1) return matchers.get(0);
			return new WildcardPatternMatcher() {
				@Override
				public boolean isMatch(String paramName) {
					for(WildcardPatternMatcher matcher : matchers) {
						if(matcher.isMatch(paramName)) return true;
					}
					return false;
				}
			};
		}
	}
1368126
public static Matcher<String> containsPatterns(String... patterns) {
        List<Matcher<? super String>> matchers = new ArrayList<Matcher<? super String>>();
        for (String pattern : patterns) {
            matchers.add(pattern(pattern));
        }
        return allOf(matchers);
    }
337514
public void addTldSkipPatterns(String... patterns) {
		Assert.notNull(patterns, "Patterns must not be null");
		this.tldSkipPatterns.addAll(Arrays.asList(patterns));
	}
672164
java.util.regex.Pattern getPattern(
            @Nonnull AnnotationValue<?> annotationMetadata,
            boolean isOptional) {
        final Optional<String> regexp = annotationMetadata.get("regexp", String.class);
        final String pattern;

        if (isOptional) {
            pattern = regexp.orElse(".*");
        } else {
            pattern = regexp
                    .orElseThrow(() -> new ValidationException("No pattern specified"));
        }

        final Pattern.Flag[] flags = annotationMetadata.get("flags", Pattern.Flag[].class).orElse(ZERO_FLAGS);
        if (isOptional && pattern.equals(".*") && flags.length == 0) {
            return null;
        }

        int computedFlag = 0;
        for (Pattern.Flag flag : flags) {
            computedFlag = computedFlag | flag.getValue();
        }

        final PatternKey key = new PatternKey(pattern, computedFlag);
        java.util.regex.Pattern regex = COMPUTED_PATTERNS.get(key);
        if (regex == null) {
            try {
                if (computedFlag != 0) {
                    regex = java.util.regex.Pattern.compile(pattern, computedFlag);
                } else {
                    regex = java.util.regex.Pattern.compile(pattern);
                }
            } catch (PatternSyntaxException e) {
                throw new IllegalArgumentException("Invalid regular expression", e);
            }
            COMPUTED_PATTERNS.put(key, regex);
        }
        return regex;
    }
911165
public static boolean regexMatch(String input, String regex) {
        return Pattern.compile(regex).matcher(input).matches();
    }
1048471
@Deprecated
    public void setPattern(Pattern pattern) {
        patterns = new ArrayList<Pattern>(1);
        patterns.add(pattern);
    }
1164497
@GwtIncompatible("java.util.regex.Pattern")
  public void containsMatch(Pattern regex) {
    if (!regex.matcher(actual()).find()) {
      failWithActual("expected to contain a match for", regex);
    }
  }
766981
private String getPatternCode(final List<Token> tokens) {
        final StringBuilder sb = new StringBuilder();
        sb.append(tokens.size());
        for (final Token token : tokens) {
            sb.append(token.getType().ordinal());
        }
        return sb.toString();
    }
103178
public static WildcardPattern[] create(@Nullable String[] patterns) {
    if (patterns == null) {
      return new WildcardPattern[0];
    }
    WildcardPattern[] exclusionPAtterns = new WildcardPattern[patterns.length];
    for (int i = 0; i < patterns.length; i++) {
      exclusionPAtterns[i] = create(patterns[i]);
    }
    return exclusionPAtterns;
  }
830330
private void checkInstancesMatchRegex(@Nullable String regex) {
        if (regex != null) {
            Pattern pattern = Pattern.compile(regex);
            instances().forEach(resource -> {
                String value = (String) resource.value();
                Matcher matcher = pattern.matcher(value);
                if (!matcher.matches()) {
                    throw TransactionException.regexFailure(this, value, regex);
                }
            });
        }
    }
902131
public CharSequence matchesPattern(final CharSequence input, final String pattern, final String message) {
        if (!Pattern.matches(pattern, input)) {
            fail(message);
        }
        return input;
    }
1214640
@GwtIncompatible("java.util.regex.Pattern")
  public void matches(Pattern regex) {
    if (!regex.matcher(actual()).matches()) {
      failWithActual("expected to match", regex);
    }
  }
659439
function replaceWithPatterns( src, patterns ){
    return _.reduce(
        patterns,
        function( replacedCode, replacement, pattern ){
            return replacedCode.replace( new RegExp( pattern, "gi" ), replacement, "gi" );
        },
        src
    );
}
864681
public static Matcher<MultiResult> sequence(final Matcher<?>... matchers) {
        checkNotEmpty(matchers);
        return new Matcher<MultiResult>() {
            @Override
            public MultiResult matches(String input, boolean isEof) {
                int matchCount = 0;
                Result[] results = new Result[matchers.length];
                Arrays.fill(results, failure(input, false));
                int beginIndex = 0;
                for (int i = 0; i < matchers.length; i++) {
                    Result result = matchers[i].matches(input.substring(beginIndex), isEof);
                    if (result.isSuccessful()) {
                        beginIndex += result.end();
                        results[i] = result;
                        if (++matchCount == matchers.length) {
                            String group = result.group();
                            Result finalResult = new SimpleResult(
                                    true,
                                    input,
                                    input.substring(0, beginIndex - group.length()),
                                    group,
                                    result.canStopMatching());
                            return new MultiResultImpl(finalResult, Arrays.asList(results));
                        }
                    } else {
                        break;
                    }
                }
                final List<Result> resultList = Arrays.asList(results);
                boolean canStopMatching = MultiResultImpl.canStopMatching(resultList);
                return new MultiResultImpl(failure(input, canStopMatching), resultList);
            }

            @Override
            public String toString() {
                return String.format("sequence(%s)", MultiMatcher.matchersToString(matchers));
            }
        };
    }
1068214
public static Pattern and(final Pattern... patterns) {
    return new Pattern() {
      @Override public int match(CharSequence src, int begin, int end) {
        int ret = 0;
        for (Pattern pattern : patterns) {
          int l = pattern.match(src, begin, end);
          if (l == MISMATCH) return MISMATCH;
          if (l > ret) ret = l;
        }
        return ret;
      }

      @Override public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append('(');
        for (Pattern pattern : patterns) {
          sb.append(pattern).append(" & ");
        }
        if (sb.length() > 1) {
          sb.delete(sb.length() - 3, sb.length());
        }
        return sb.append(')').toString();
      }
    };
  }
687147
private Pattern[] validateAndMergePatternInput(final Pattern pattern, final Pattern... patterns) {
        // Precondition check
        if (pattern == null) {
            throw new IllegalArgumentException("At least one pattern must not be specified");
        }
        final List<Pattern> merged = new ArrayList<Pattern>();
        merged.add(pattern);
        for (final Pattern p : patterns) {
            merged.add(p);
        }
        return merged.toArray(PATTERN_CAST);
    }