Posted by fienen@gmail.com on 03/16/07 16:19
I am working on a script to handle a search query. In some instances,
the query could come through as "isbn:%20#############" (where %20 is
an encoded space and the colon is optional). Basically I want to
strip off the ISBN portion and leave just the numbers if that is the
case.
Orignally I was trying
$value = $_GET["query"];
if (preg_match("isbn:?%20", $value))
{
$isbn = preg_replace("isbn:?%20", "", $value)
}
else
{
$isbn = $value
}
Doesn't seem to work though. Any thoughts?
[Back to original message]
|