PHP regular expression match gives error

dalmidog

New Member
Trying to check the string for pattern.\[code\]$variable = '[text]';if (eregi("/(\[(.*?)\])/", $variable)) {}\[/code\]This code gives error \[code\]eregi() [function.eregi]: REG_BADRPT\[/code\]What is the solution for this?
 
Back
Top