apparently invalid regex in queries

Bug #1131984 reported by Paul J. Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Paul J. Lucas

Bug Description

The FOTS test re00056 is:

    (every $s in tokenize('', ',')
      satisfies matches($s, '^(?:[^a-d-b-c])$'))
    and
    (every $s in tokenize('a-b,c-c,ab,cc', ',')
      satisfies not(matches($s, '^(?:[^a-d-b-c])$')))

The regular expression [^a-d-b-c] seems wrong. The "a-d" means "'a' through 'd', i.e., abcd, and the "b-c" means "'b' through 'c', i.e., "bc". However, the '-' between the 'd' and 'b' makes no sense. It can't mean "'d' through 'b'" since 'b' is less than 'd', nor can it mean "a-d without 'b' and without 'c'," i.e., range subtraction per <http://www.w3.org/TR/xmlschema-2/#nt-charClassSub>.

Similarly, the FOTS test re00086 is:

    (every $s in tokenize(',a-1x-7,c-4z-9,a-1z-8a-1z-9,a1z-9,a-1z8,a-1,z-9', ',')
      satisfies matches($s, '^(?:[a-c-1-4x-z-7-9]*)$'))
    and
    (every $s in tokenize('', ',')
      satisfies not(matches($s, '^(?:[a-c-1-4x-z-7-9]*)$')))

The regular expression [a-c-1-4x-z-7-9] seems wrong for the same reason. This may be a limitation of ICU.

Tags: fots w3c

Related branches

Changed in zorba:
importance: Undecided → Critical
milestone: none → 2.9
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

Added W3C bug:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21425

Marked this issue as "Invalid".

summary: - FOTS: apparently invalid regex in queries
+ apparently invalid regex in queries
Changed in zorba:
status: Triaged → Invalid
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

Please see comment from Mike Kay:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21425#c1

Marking the bug as "New"

Changed in zorba:
status: Invalid → New
Chris Hillery (ceejatec)
tags: removed: regex
tags: added: w3c
description: updated
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

These tests probably fail for the same reason given in <https://bugs.launchpad.net/zorba/+bug/1131990/comments/1>.

Changed in zorba:
assignee: Paul J. Lucas (paul-lucas) → Markos Zaharioudakis (markos-za)
Changed in zorba:
assignee: Markos Zaharioudakis (markos-za) → Paul J. Lucas (paul-lucas)
Changed in zorba:
status: New → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.