_search_find_match_with_simplify

function _search_find_match_with_simplify

_search_find_match_with_simplify($key, $text, $boundary, $langcode = NULL)

Finds an appropriate keyword in text.

Parameters

string $key: The keyword to find.

string $text: The text to search for the keyword.

string $boundary: Regular expression for the boundary character class (characters that indicate spaces between words).

string|null $langcode: Language code for the language of $text, if known.

Return value

string|null A segment of $text that is between word boundary characters that either matches $key directly, or matches $key when both this text segment and $key are processed by search_simpli