$parts = preg_split('/\s+ (and|or) \s+/x', $input, -1, PREG_SPLIT_DELIM_CAPTURE); ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl