[PHP][RegExp] More characters

Hey people I ran into a little hiccup and I hope one of you can help me out.

I’m trying to build a query filter to replace ‘:1’, ‘:2’ etc with the input of the function. Example:

SELECT * FROM tickets WHERE ticket_id = :1

Then use:

$binds = func_get_args();
foreach($binds as $index => $name)
    $this->query = preg_replace("/ \:$index/", " '".$name."'", $this->query);

To replace the query placeholders with real values (as delivered with the function).

Now this is working like a charm, however I run into a problem once I hit the 10’s or 100’s
For example, the return value of :10 will be seen as 'valueof1’0. I figure my regular expression only takes the first character that is detected in account. How do I make it so it detects the first and if possible any next nummerical character till whitespace or the end of the string, ánd still include it in the replace process?

Thanks in advance!