[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-05-04 (02:31) |
From: | Jason Hickey <jyh@c...> |
Subject: | Re: [Caml-list] regexp bug? |
You may wish to visit, for example, the egrep(1) man page for a description of regular expressions. Note that the [a-zA-Z] and [aA-zZ] regular expressions are different. The former contains the alphabetic characters. The latter is equivalent to [A-z], which in ASCII also contains several other characters between 'A' and 'z', including '_'. Jason Eliot Handelman wrote: > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -- Jason Hickey http://www.cs.caltech.edu/~jyh Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257