PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_LexerGenerator » Bug #9231

Non-greedy regex extension

Details

Submitted2006-11-04 00:36 UTC
Fromtom at inflatablecookie dot com
Assignedcellog
StatusClosed
PackagePHP_LexerGenerator
PHP Version5.1.5
OSWin 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