Hi Everyone,
I need a regular expression to 'preg_match' to return true if a $tring contains less than or equal to three words.
For example:
$string = 'Sony'; // true
$string = 'Sony Ericcson'; // true
$string = 'Allen & Heath'; // true
$string = 'Some three word string'; // true
$string = 'Some four word string'; // false
I am lost when it comes to regular expressions so could someone tell me what to put...
$bool = preg_match('/---HERE---/', $string);
Thanks in advance.