Why does this preg_match not return 1?

Posted by JavaRocky on Stack Overflow See other posts from Stack Overflow or by JavaRocky
Published on 2010-05-17T22:21:54Z Indexed on 2010/05/17 22:30 UTC
Read the original article Hit count: 186

Filed under:
|
|

I've been looking at this code and it's supposed to match my $input string and in $matches[0] store 'testing'

$input = ':testing';
$r = preg_match('/^(?<=\:).+/',$input,$matches);

What's wrong with it?

© Stack Overflow or respective owner

Related posts about php

Related posts about preg-match