Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regexp_case_fold does not work correctly with an exclusion set #4650

Closed
vicuna opened this issue Nov 25, 2008 · 1 comment
Closed

regexp_case_fold does not work correctly with an exclusion set #4650

vicuna opened this issue Nov 25, 2008 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 25, 2008

Original bug ID: 4650
Reporter: AHuebner
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:14:16Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.2
Fixed in version: 3.11.1+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

When using an exclusion character set, regexp_case_fold produces incorrect results.

#load "str.cma" ;;

open Str ;;

string_match (regexp_case_fold "[^a]") "a" 0 ;;

  • : bool = true

This is due to the set being first "negated" (everything but 'a', including 'A') and applying case_fold afterwards. ('A' will lead to 'a' in the final set.)

@vicuna
Copy link
Author

vicuna commented Dec 12, 2008

Comment author: @xavierleroy

Tentative fix in 3.11 release branch. Should go in 3.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants