From: William Lovas <wlovas@stwing.upenn.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Str.string_match incorrect
Date: Sat, 25 Dec 2004 20:14:44 -0500 [thread overview]
Message-ID: <20041226011443.GA24706@force.stwing.upenn.edu> (raw)
In-Reply-To: <1103936225.6201.243.camel@pelican.wigram>
On Sat, Dec 25, 2004 at 11:57:05AM +1100, skaller wrote:
> On Sat, 2004-12-25 at 04:40, Christopher A. Watford wrote:
>
> > Going by PCRE's documentation
>
> no idea why I would do that ...
>
> > Str.string_match (Str.regexp "a") "ab" 0 ;;
> >
> > And in PCRE /a/ matches "ab" or "aa" or "ba".
>
> # Str.string_match (Str.regexp "a") "xax" 0;;
> - : bool = false
*That* i would call a bug. I think that of
Str.string_match (Str.regexp "a") "xa" 0;;
Str.string_match (Str.regexp "a") "ax" 0;;
either both should evaluate to true, or neither should. Both evaluating to
true would match the typical perl/grep/etc. notion of searching anywhere
inside a string to for a matching substring, whereas neither doing so would
correspond to the mathematical notion of containment in the language of a
regular expression.
William
next prev parent reply other threads:[~2004-12-26 1:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-22 3:49 skaller
2004-12-22 7:44 ` [Caml-list] " Evan Martin
2004-12-22 8:00 ` William Lovas
2004-12-22 8:38 ` Evan Martin
2004-12-22 10:37 ` Gerd Stolpmann
2004-12-22 15:57 ` skaller
2004-12-22 16:58 ` David Brown
2004-12-23 2:33 ` skaller
2004-12-24 17:40 ` Christopher A. Watford
2004-12-25 0:57 ` skaller
2004-12-25 3:07 ` Christopher A. Watford
2004-12-25 4:24 ` skaller
2004-12-26 1:14 ` William Lovas [this message]
2004-12-22 17:26 ` Kurt Welgehausen
2004-12-23 2:09 ` skaller
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=20041226011443.GA24706@force.stwing.upenn.edu \
--to=wlovas@stwing.upenn.edu \
--cc=caml-list@yquem.inria.fr \
/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