![]() |
|
|
+ Search |
![]()
|
Dec 22nd, 2001 09:39
Kurtis Kopf,
This is the best way that I can think of...
if(ereg("([Hh][Ii][Tt][Ss] *: *)([0-9]+)",$string,$myvars))
echo $myvars[2];
this searches the $string variable for several variations
of "Hits:0123" and returns the first match into $myvars. The first
encapsulation of () becomes $myvars[1], the second becomes $myvars[2].