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

Str.regexp and Str.global_replace #2901

Closed
vicuna opened this issue Aug 14, 2001 · 1 comment
Closed

Str.regexp and Str.global_replace #2901

vicuna opened this issue Aug 14, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 14, 2001

Original bug ID: 484
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: James Leifer
Version: 3.02
OS: Mandrake 8
Submission from: oto.inria.fr (192.93.2.2)

There seems to be a problem with Str.regexp or Str.global_replace....

Consider the following program:

(* grbug.ml )
open Str ;;
print_string ((global_replace (regexp "x?x?") "yyy" "zzz") ^ "\n") ;;
(
end of grbug.ml *)

When I build and execute it, I get a stack overflow error:

$ ocamlc -o grbug str.cma grbug.ml
$ ./grbug
Fatal error: uncaught exception Stack_overflow

-James

@vicuna
Copy link
Author

vicuna commented Aug 30, 2001

Comment author: administrator

Fun with nullable regexps. Fixed 2001-08-30 by XL, using same strategy as in
sed and perl.

@vicuna vicuna closed this as completed Aug 30, 2001
@vicuna vicuna added the bug label Mar 19, 2019
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

1 participant