preg_match: tekrarlamak için hiçbir şey yok / maç

0 Cevap php

Ben kullanıyorum: if(!preg_match('/^+[0-9]$/', '+1234567'))

ve alıyorum:

Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 1

herhangi bir fikir neden?


update: Şimdi bu kullanarak: if(!preg_match('/^\+[0-9]$/', '+1234567'))

ve hiçbir maç alıyorum.

herhangi bir fikir neden?

0 Cevap