Yeah, I checked the manual and I guess you do need a third parameter, even if you don't use it, which doesn't make sense to me.

With preg_match(), however, the third parameter is optional.

Glad you got it working.