Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
PCRE (PHP <7.3)

/
^(?:[<>~+-]?\((?:(?:[<>~+-]?[\w][\w-]+[*]?|"[^"]+")(?:\s+(?:[<>~+-]?[\w][\w-]+[*]?|"[^"]+"))+)\)|[<>~+-]?[\w][\w-]+[*]?|"[^"]+")(?:\s+(?:[<>~+-]?\((?:(?:[<>~+-]?[\w][\w-]+[*]?|"[^"]+")(?:\s+(?:[<>~+-]?[\w][\w-]+[*]?|"[^"]+"))+)\)|[<>~+-]?[\w][\w-]+[*]?|"[^"]+"))*$
/

Description

Checks if an input string is compatible with the BOOLEAN mode of MySQL full text search system

Submitted by greezybacon - 9 years ago