XK8ER
asked on
php with preg match
how can I match this site when the last digits always change
site.com/?d=YS98IIR06
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Note that we can provide all sorts of different patterns that will match - what's also important though is what you want to NOT match. You might like to describe that too.
$var='site.com/?d=YS98IIR0
If yes and you want to limit to two digits only
preg_match('#site.com/[?]=
If you want to limit to at least one digit:
preg_match('#site.com/[?]=
zero or more digits:
preg_match('#site.com/[?]=