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

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