Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005259OCamlOCaml generalpublic2011-04-28 13:282011-04-29 11:22
Reportergerd 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformallOSallOS Versionall
Product Version3.12.0 
Target VersionFixed in Version 
Summary0005259: Support for extended regular expressions
DescriptionThe idea is to have a new function Str.eregexp that parses the "extended" syntax. The main difference so far looks tiny, but has a lot of impact on the readability of code. Essentially, ( ) | no longer need a backslash. The reference standard here are POSIX extended regular expressions. It also defines the {bound} construct.

The extended syntax is nowadays used in most other programming languages. It feels like stepping back when using ocaml.

When introducing this, it might also be a good idea to define/reserve a generic way for extending the syntax later, e.g. for additional assertions and non-capturing groups, as suggested by other bug reporters. Using more backslash sequences does not look very elegant. More readable seems to be:

- Character classes like [[:name:]]
- Group with modifiers: (?switches:regexp), e.g.
  (?i:regexp) for a case-insensitive non-capturing group
- Named option or assertion (*NAME)
Additional InformationOne would also need Str.equote.

A good reference comparing regexp flavors by syntax: http://www.regular-expressions.info/refflavors.html [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 13:28 gerd New Issue
2011-04-29 11:22 doligez Status new => acknowledged


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker