lithium\util\StringDeprecated::extract()
Extract a part of a string based on a regular expression $regex.
Parameters
-
string
$regexThe regular expression to use.
-
string
$strThe string to run the extraction on.
-
integer
$indexThe 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);
}