Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002907 [Quercus] minor always 09-05-08 01:23 09-09-08 10:56
Reporter wikipo View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.1.6
Summary 0002907: Regex option 'A' ignored
Description When a regex expression uses option 'A', the match functions must use the offest specified.

I have found this in mediawiki 1.12 code in this expression:

  $elementsRegex = "~($xmlishRegex)(?:\s|\/>|>)|(!--)~iA";

subsequently used in a call to preg_match with offset specified.
Additional Information I think the semantics of option 'A' is to anchor the search to the offset specified relative to the beginning of the text, while option '^' means to anchor to the beginning of the text.

I changed the test in RegexpNode.AnchorBegin.match:

// if (offset == 0)
        if (offset == state._first)

This solves the problem at least for mediawiki.
Attached Files

- Relationships

- Notes
(0003414)
nam
09-09-08 10:56

php/153h
 

- Issue History
Date Modified Username Field Change
09-05-08 01:23 wikipo New Issue
09-05-08 19:42 nam Status new => assigned
09-05-08 19:42 nam Assigned To  => nam
09-09-08 10:56 nam Status assigned => closed
09-09-08 10:56 nam Note Added: 0003414
09-09-08 10:56 nam Resolution open => fixed
09-09-08 10:56 nam Fixed in Version  => 3.2.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker