Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L
libxml2
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 69
    • Issues 69
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • libxml2
  • Issues
  • #188

Closed
Open
Opened Oct 02, 2020 by Gabriele Buscone@gabriele.buscone

Incorrect interpretation of caret (^) in regexp character group

Hi, I report here an issue from bugzilla beacuse it seems that it's not been fixed yet. Here's the link: https://bugzilla.gnome.org/show_bug.cgi?id=779751

The regexp '[ab^cd]' is effectively equivalent to '[^cd]', since libxml2 treats the caret as a negation wherever it appears in a Character Group. But according to both https://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs and https://www.w3.org/TR/xmlschema11-2/#regex, the caret is only special when it appears as the first character of a Character Group, and should not need escaping when used elsewhere - i.e. '[ab^cd]' should match any of the 5 characters in the group. (The regexp '[ab^cd]' does work as expected, but the escape should not be needed.)

There's also a proposed patch for version 2.9.4.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/libxml2#188