You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1903 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
if (Str.string_match (Str.regexp "^[ -0-9]*$") "41" 0) then
print_endline ("Here enters with Ocaml 3.06")
else
print_endline ("And here with Ocaml 3.07")
(* Works fine in both with ^[- 0-9]*$ *)
The text was updated successfully, but these errors were encountered:
if (Str.string_match (Str.regexp "^[ -0-9]*$") "41" 0) then
print_endline ("Here enters with Ocaml 3.06")
else
print_endline ("And here with Ocaml 3.07")
(* Works fine in both with ^[- 0-9]*$ *)
Hello,
This is clearly a bug in 3.06, and we are glad that it is fixed in 3.07.
The O'Caml documentation refers to GNU emacs for the syntax of
regular expressions. The GNU emacs documentation specifies that
a '-' in a character set stands for itself if it is the first or last character
in the set, or if it follows a range.
Thus your regexp is parsed as:
^ (beginning of line)
[ (starting a character set)
(space)-0 (a range of characters that doesn't include 1 nor 4)
(one character)
9 (one character)
] (ending the character set)
$ (end of line)
On Thu, Nov 06, 2003 at 04:41:13PM +0100, Damien Doligez wrote:
Full_Name: Vladimir Támara Patiño
if (Str.string_match (Str.regexp "^[ -0-9]*$") "41" 0) then
print_endline ("Here enters with Ocaml 3.06")
else
print_endline ("And here with Ocaml 3.07")
(* Works fine in both with ^[- 0-9]*$ *)
Hello,
This is clearly a bug in 3.06, and we are glad that it is fixed in 3.07.
The O'Caml documentation refers to GNU emacs for the syntax of
regular expressions.
Ok. Thank you. Sorry I didn't read the emacs documentation.
--
Que Dios nos ilumine para hacer su voluntad. Información de dominio público.
Original bug ID: 1903
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Vladimir Támara Patiño
Version: 3.07
OS: OpenBSD
Submission from: gateway1-theorie.informatik.uni-kl.de (131.246.16.250)
if (Str.string_match (Str.regexp "^[ -0-9]*$") "41" 0) then
print_endline ("Here enters with Ocaml 3.06")
else
print_endline ("And here with Ocaml 3.07")
(* Works fine in both with ^[- 0-9]*$ *)
The text was updated successfully, but these errors were encountered: