Class RegexMatcher

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<String>
org.elasticsearch.test.hamcrest.RegexMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<String>, org.hamcrest.SelfDescribing

public class RegexMatcher extends org.hamcrest.TypeSafeMatcher<String>
Matcher that supports regular expression and allows to provide optional flags
  • Constructor Details

    • RegexMatcher

      public RegexMatcher(String regex)
    • RegexMatcher

      public RegexMatcher(String regex, int flag)
  • Method Details

    • matchesSafely

      protected boolean matchesSafely(String item)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<String>
    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • matches

      public static RegexMatcher matches(String regex)
    • matches

      public static RegexMatcher matches(String regex, int flag)