lithium\util\StringDeprecated::extract()
Extract a part of a string based on a regular expression $regex
.
Parameters
-
string
$regex
The regular expression to use.
-
string
$str
The string to run the extraction on.
-
integer
$index
The number of the part to return based on the regex.
Returns
mixedSource
public static function extract($regex, $str, $index = 0) {
$message = "lithium\util\String::extract() has been deprecated in favor of ";
$message .= "lithium\util\Text::extract().";
trigger_error($message, E_USER_DEPRECATED);
return Text::extract($regex, $str, $index);
}