Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Regular expression error in zem_rewrite
I’m trying to use zem_rewrite without any luck. When I install the 0.2 version of zem_rewrite and view any page, PHP complains with this error:
Warning: Compilation failed: unrecognized character after (? at offset 3 in /var/www/txp/html/textpattern/publish.php(767) : eval()’d code on line 59
The problem appears to be with the <code>(?P</code> part of the regular expressions such as <code>(?P<s>\w+)</code>. I did notice this comment in the zem_rewrite code:
- The <code>(?P<foo>)</code> items in the patterns become associative array members.
- So we can exctract all the non-numeric keys and map those to global variables.
(Those are supposed to be comments, but Textile turned them into a numbered list…)
Is this something that is available only in newer versions of PHP? I’m running a pretty old version, 4.1.2. I didn’t see any documentation on php.net about this ?P option at all.
Thanks!
Last edited by Geary (2004-11-24 18:36:16)
Offline
#2 2004-11-24 21:27:47
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Regular expression error in zem_rewrite
> Is this something that is available only in newer versions of PHP? I’m running a pretty old version, 4.1.2. I didn’t see any documentation on php.net about this ?P option at all.
Could be. You’re right, it’s not documented there.
BTW, that version of zem_rewrite has some other problems that mean it won’t work without modification. I’ve been testing a fully working version, it’s not quite ready for release though.
Alex
Offline
Pages: 1