| Anonymous | Login | Signup for a new account | 2013-05-21 11:52 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005259 | OCaml | OCaml general | public | 2011-04-28 13:28 | 2011-04-29 11:22 | ||||||
| Reporter | gerd | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | N/A | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | all | OS | all | OS Version | all | ||||||
| Product Version | 3.12.0 | ||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0005259: Support for extended regular expressions | ||||||||||
| Description | The 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 Information | One would also need Str.equote. A good reference comparing regexp flavors by syntax: http://www.regular-expressions.info/refflavors.html [^] | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
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 |