Extracts a module-specific search option from a search expression.
Search options are added using SearchExpression::insert() and retrieved using SearchExpression::extract(). They take the form option:value, and are added to the ordinary keywords in the search expression.
string $option: The name of the option to retrieve from the search expression.
string The value previously stored in the search expression for option $option, if any. Trailing spaces in values will not be included.
public function extract($option) {
if (preg_match('/(^| )' . $option . ':([^ ]*)( |$)/i', $this->expression, $matches)) {
return $matches[2];
}
}