@@ -0,0 +1,1366 @@
+package org.hamcrest.text;%0A%0Aimport org.hamcrest.Description;%0Aimport org.hamcrest.Factory;%0Aimport org.hamcrest.Matcher;%0Aimport org.hamcrest.TypeSafeMatcher;%0A%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * Match strings against regular expressions.%0A *%0A * Ported from future hamcrest : https://github.com/hamcrest/JavaHamcrest/blob/master/hamcrest-library/src/main/java/org/hamcrest/text/MatchesPattern.java%0A */%0Apublic final class MatchesPattern extends TypeSafeMatcher%3CString%3E %7B%0A  /**%0A   * Create a %7B@code String%7D matcher, comparing items to the given regular expression.%0A   *%0A   * @param pattern compiled regular expression%0A   */%0A  public static Matcher%3CString%3E matchesPattern(Pattern pattern) %7B%0A    return new MatchesPattern(pattern);%0A  %7D%0A%0A  /**%0A   * Create a %7B@code String%7D matcher, comparing items to the given regular expression.%0A   *%0A   * @param regex regular expression%0A   */%0A  public static Matcher%3CString%3E matchesPattern(String regex) %7B%0A    return new MatchesPattern(Pattern.compile(regex));%0A  %7D%0A%0A  private final Pattern pattern;%0A%0A  public MatchesPattern(Pattern pattern) %7B%0A    this.pattern = pattern;%0A  %7D%0A%0A  @Override%0A  protected boolean matchesSafely(String item) %7B%0A    return pattern.matcher(item).matches();%0A  %7D%0A%0A  @Override%0A  public void describeTo(Description description) %7B%0A    description.appendText(%22a string matching the pattern '%22 + pattern + %22'%22);%0A  %7D%0A%7D%0A

Include MatchesPattern from Hamcrest 2.0.0