protected function prepareMysqlRegexp($string)
    {
        $regexp = $string;

        // first remove trailing increment
        $regexp = preg_replace('/\([0-9]\)$/', "", $regexp);

        // escape existing parenthesis
        $regexp = preg_replace('(\(|\))', '\\\\${0}', $regexp);

        // append matching mysql matching pattern
        $regexp .= "([[.left-parenthesis.]][0-9]*[[.right-parenthesis.]])*$";

        return $regexp;

    }
protected function prepareMysqlRegexp($string)
    {
        $regexp = $string;

        // first remove trailing increment
        $regexp = preg_replace('/\([0-9]\)$/', "", $regexp);

        // escape existing parenthesis
        $regexp = preg_replace('(\(|\))', '\\\\${0}', $regexp);

        // append matching mysql matching pattern
        $regexp .= "([[.left-parenthesis.]][0-9]*[[.right-parenthesis.]])*$";

        return $regexp;

    }
protected function prepareMysqlRegexp ( $ string ) { $ regexp = $ string ; // first remove trailing increment $ regexp = preg_replace ( '/\([0-9]\)$/' , "" , $ regexp ) ; // escape existing parenthesis $ regexp = preg_replace ( '(\(|\))' , '\\\\${0}' , $ regexp ) ; // append matching mysql matching pattern $ regexp .= "([[.left-parenthesis.]][0-9]*[[.right-parenthesis.]])*$" ; return $ regexp ; }
create regexp for mysql query
@param $string NodeRoute::route
@return string
create regexp for mysql query