PHP正規表現preg_grep
preg_quote

preg_grep正規表現

strlen

正規表現に一致する配列要素のみ返します。

構文

preg_grep(string $pattern, array $array): array