Question 1:
$text = array("This is a string for demonstration testing");
$result = preg_grep("/test/",$text);
In the above, preg_grep would hit on the text 'test', within the word 'testing'.
My question is, how can I instruct the PCRE (with preg_grep preferably) engine to only hit on the text 'test' when it appears as its own word, and not a series of characters within another word?
Question 2:
$text = array("This is a test string for demonstration testing");
$result = preg_grep("/test/",$text);
In the above text string, how can I instruct the PCRE (with preg_grep preferably) engine to hit on all instances of the character series 'test'? After it hits on the first character series, 'test', how can I use preg_grep to continue searching the string for other instances of 'test'?
Question 3:
Does anyone have any good Internet resources on Regex that doesn't require you to understand hieroglyphs?