Home » PHP » PHP_LexerGenerator » Bug #9231
Non-greedy regex extension
Details
| Submitted | 2006-11-04 00:36 UTC |
|---|---|
| From | tom at inflatablecookie dot com |
| Assigned | cellog |
| Status | Closed |
| Package | PHP_LexerGenerator |
| PHP Version | 5.1.5 |
| OS | Win XP SP2 |
| Roadmaps | (Not assigned) |
Comments
[2006-11-04 00:36 UTC] tom at inflatablecookie dot com
Description:
------------
When trying to use a ? character after a quantifier to stop the regex from being greedy, the compiler dies reporting "Unexpected MULTIPLIER(?)".
I hope I haven't missed the mark on this one - I'm no regex guru!
Test script:
---------------
/*!lex2php
%input $this->data
%counter $this->N
%token $this->token
%value $this->value
%line $this->line
T_INLINE_HTML = /(\s|.)+?(?=<[?%])/
[2006-11-04 00:40 UTC] tom at inflatablecookie dot com
Edit : Changed summary - firefox reverted it back to the last bug for some reason