English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
regexp bug?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-05-03 (23:44)
From: Eliot Handelman <eliot@g...>
Subject: regexp bug?
This doesn't seem right:


        Objective Caml version 3.08.0
open Str

let search r str =
  search_forward (regexp r) str 0;
  matched_string str;;
 
# search "[aA-zZ]+" "_test";;
- : string = "_test"

whereas:

# search "[a-zA-Z]+" "_test";;
- : string = "test"


-- eliot