<?php $string = "tell me about cats";preg_match("~\b(tell me about|you know(?: of| about)?|what do you think(?: of| about)?|(?:what|who) is|(?:whats|whos)) ((?:[a-z]+ ?){1,2})$~", $string, $match);print_r($match);?>
Standard input is empty
Array ( [0] => tell me about cats [1] => tell me about [2] => cats )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!