Re: [PHP] Regular Expression differences between 4.4 and 5.2

2008-09-12 Thread Jochem Maas
Ewen Cumming schreef: Actually bummer - testing on wrong version. The U modifier is causing problems too - only matching the first character instead of the whole string. hmm, missed that, that might require adding ?U to relevant sub-assertion ... I'm wondering if your regexp is not 'wrong' (b

Re: [PHP] Regular Expression differences between 4.4 and 5.2

2008-09-12 Thread Ewen Cumming
Actually bummer - testing on wrong version. The U modifier is causing problems too - only matching the first character instead of the whole string. 2008/9/12 Ewen Cumming <[EMAIL PROTECTED]> > Hi Jochem, > > Replacing the 's' modifier with 'm' fixed it this instance but broke other > parts on

Re: [PHP] Regular Expression differences between 4.4 and 5.2

2008-09-12 Thread Ewen Cumming
Hi Jochem, Replacing the 's' modifier with 'm' fixed it this instance but broke other parts on the site (the same result as removing 's'). But the other regex ( $pattern = "/ ]+)([^>]*)>(.*?)| ]+)([^>]*)>/Ui";) is working perfectly. I will continue to test and see if it throws up any other probl

Re: [PHP] Regular Expression differences between 4.4 and 5.2

2008-09-12 Thread Jochem Maas
Jochem Maas schreef: Ewen Cumming schreef: Hi everybody, ... BUT I may have work around for you, try this regexp (replaces s modifer with m modifier): $pattern = "/ ]+)([^>]*)>(.*?)| ]+)([^>]*)>/mi"; the following pattern also seems to do what you want: $pattern = "/ ]+)([^>]*)>(.*

Re: [PHP] Regular Expression differences between 4.4 and 5.2

2008-09-12 Thread Jochem Maas
Ewen Cumming schreef: Hi everybody, ... ]+)([^>]*)>(.*?)| ]+)([^>]*)>/si"; preg_match_all( $pattern, $string, $matches ); echo phpversion(); var_dump($matches); ?> Input.inc contains the string that is giving the different results - its probably to long to include so you can find it at h