lib/WebDriverExpectedCondition.php
public static function urlMatches($urlRegexp)
    {
        return new static(
            function (WebDriver $driver) use ($urlRegexp) {
                return (bool) preg_match($urlRegexp, $driver->getCurrentURL());
            }
        );
    }
public static function urlMatches($urlRegexp)
    {
        return new static(
            function (WebDriver $driver) use ($urlRegexp) {
                return (bool) preg_match($urlRegexp, $driver->getCurrentURL());
            }
        );
    }
public static function urlMatches ( $ urlRegexp ) { return new static ( function ( WebDriver $ driver ) use ( $ urlRegexp ) { return ( bool ) preg_match ( $ urlRegexp , $ driver -> getCurrentURL ( ) ) ; } ) ; }
An expectation for checking current page URL matches the given regular expression.

@param string $urlRegexp The regular expression to test against.
@return static Condition returns whether current URL matches the regular expression.
An expectation for checking current page URL matches the given regular expression .