Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003969OCamlotherlibspublic2006-02-02 22:562016-12-07 15:12
Assigned To 
PlatformOSOS Version
Product Version3.09.0 
Target VersionFixed in Version 
Summary0003969: Regular expressions should support non-capturing groups
DescriptionIn Perl, one can write qr"start(?:alt1|alt2|alt3)(.*)end" to compile a regular expression that has only one capturing group, namely the second one. The first "group" is just an alternative. I have written a patch to support this feature in O'Caml too, since I don't know of another way to write the regexp above that is similarly short and readable.
Additional InformationUnfortunately, this patch might change the behavior of some regular expressions that look like foo\(?, because a question mark that appears at the start of a regular expression is taken literally.
Attached Files? file icon patch-ca [^] (660 bytes) 2006-02-02 22:56 [Show Content]

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2006-02-02 22:56 rillig New Issue
2006-02-02 22:56 rillig File Added: patch-ca
2006-03-29 16:27 doligez Status new => acknowledged
2013-09-03 17:03 doligez Tag Attached: patch
2016-12-07 15:12 shinwell Category OCaml general => OCaml otherlibs
2017-02-23 16:42 doligez Category OCaml otherlibs => otherlibs

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker