From: Jason Hickey <jyh@cs.caltech.edu>
To: eliot@generation.net
Cc: caml <caml-list@inria.fr>
Subject: Re: [Caml-list] regexp bug?
Date: Tue, 03 May 2005 19:31:12 -0700 [thread overview]
Message-ID: <427833F0.6060004@cs.caltech.edu> (raw)
In-Reply-To: <4278377F.30502@generation.net>
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
prev parent reply other threads:[~2005-05-04 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 2:46 Eliot Handelman
2005-05-03 23:56 ` [Caml-list] " Hal Daume III
2005-05-04 5:48 ` Eliot Handelman
2005-05-04 2:31 ` Jason Hickey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427833F0.6060004@cs.caltech.edu \
--to=jyh@cs.caltech.edu \
--cc=caml-list@inria.fr \
--cc=eliot@generation.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox