Re: [PHP] Preg_Replace $pattern syntax error

2008-06-10 Thread Daniel Brown
On Mon, Jun 9, 2008 at 8:07 PM, Graham Anderson <[EMAIL PROTECTED]> wrote: > Hi > > How can I convert the regular expression: > (.*?) > into a pattern that PHP will accept? [snip!] Change this: $pattern='(.*?)'; To this: $pattern='/(.*?)<\/p>/Uis'; This adds the delimiters (/) to th

[PHP] Preg_Replace $pattern syntax error [solved]

2008-06-09 Thread Graham Anderson
I needed to add the ~ character as a delimiter. So, the below now works $pattern='~(.*?)~'; G Hi How can I convert the regular expression:left:\s+(\d+)px;">(.*?) into a pattern that PHP will accept? I am getting the error: Warning: preg_replace() [function.preg-replace]: Unknown modifier

[PHP] Preg_Replace $pattern syntax error

2008-06-09 Thread Graham Anderson
Hi How can I convert the regular expression:\s+(\d+)px;">(.*?) into a pattern that PHP will accept? I am getting the error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '(' in /Library/WebServer/Documents/tamagotchi/runtime/content/js/tiny_mce/ examples/tinymce_regex