problems with regular expression and grep
I would appreciate help with the following.
if $userinput is the variable representing user input.
If the search term is
$newuserinput = "[^0123456789.:]".$userinput."[^0123456789.:]";
and within a php file I call
exec ($mydirectory."grep -E "newuserinput $mystring", $searchoutput, $searchstatus);
I have found that this grep command works most of the time except when
there is a space character in the variable $userinput.
What can I do to this expression to make it work when there are spaces
in the $userinput variable?