Class UrlRegexRequestMatcher
java.lang.Object
org.springframework.test.web.servlet.htmlunit.UrlRegexRequestMatcher
- All Implemented Interfaces:
- WebRequestMatcher
A 
WebRequestMatcher that allows matching on
 WebRequest#getUrl().toExternalForm() using a regular expression.
 For example, if you would like to match on the domain code.jquery.com,
 you might want to use the following.
 
 WebRequestMatcher cdnMatcher = new UrlRegexRequestMatcher(".*?//code.jquery.com/.*");
 - Since:
- 4.2
- Author:
- Rob Winch, Sam Brannen
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionUrlRegexRequestMatcher(String regex) UrlRegexRequestMatcher(Pattern pattern) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanmatches(org.htmlunit.WebRequest request) Whether this matcher matches on the supplied web request.
- 
Constructor Details- 
UrlRegexRequestMatcher
- 
UrlRegexRequestMatcher
 
- 
- 
Method Details- 
matchespublic boolean matches(org.htmlunit.WebRequest request) Description copied from interface:WebRequestMatcherWhether this matcher matches on the supplied web request.- Specified by:
- matchesin interface- WebRequestMatcher
- Parameters:
- request- the- WebRequestto attempt to match on
- Returns:
- trueif this matcher matches on the- WebRequest
 
 
-