Project

Profile

Help

Bug #2086

closed

ArrayIndexOutOfBounds handling regular expression

Added by Michael Kay over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
2014-06-08
Due date:
% Done:

0%

Estimated time:
Platforms:

Description

Reported on saxon-help list by Gerrit Imsieke:

I get a "SEVERE: Exception java.lang.IndexOutOfBoundsException in

renderXML: null" exception under very peculiar conditions.

This will raise the exception:

replace('a-d-0-9', '[^-0-9a-z_]', 'X', 'i')

Example:

https://subversion.le-tex.de/common/sandbox/2014-06-07_CE_regex_range_minus/test.html?xsl=test.xsl

These won’t raise the exception:

Changing the character range:

replace('a-d-0-9', '[^-0-9a-c_]', 'X', 'i')

Example:

https://subversion.le-tex.de/common/sandbox/2014-06-07_CE_regex_range_minus/test.html?xsl=test_ok.xsl

Removing the 'i' flag:

replace('a-d-0-9', '[^-0-9a-z_]', 'X')

Moving the minus after the underscore:

replace('a-d-0-9', '[^0-9a-z_-]', 'X', 'i')

Removing the negation:

replace('a-d-0-9', '[-0-9a-z_]', 'X', 'i')

Gerrit

Filed in person during XML London:

https://twitter.com/gimsieke/status/475294067765809153/photo/1

Please register to edit this issue

Also available in: Atom PDF