Just use preg_split() and pass the i flag for case insensitivity:
$keywords = preg_split("/your delimiter/i", $text);
Also, make sure that your delimiter you pass to preg_split() does not quote any special regular expression characters. Otherwise, make sure you avoid them correctly or use preg_quote() .
Michael robinson
source share