regex_token ( $token )

Makes the given token PCRE-compatible.

Access

public static

Parameters

Parameter

Type

Required

Description

$token

string

Required

The token

Returns

Type

Description

string

The PCRE-compatible version of the token

Source

Method defined in extensions/s3streamwrapper.class.php | Toggle source view (6 lines) | View on GitHub

public static function regex_token($token)
{
    $token = str_replace('/', '\/', $token);
    $token = quotemeta($token);
    return str_replace('\\\\', '\\', $token);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback