caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: help with regular expression
Date: Mon, 6 Dec 2010 13:11:29 +0000 (UTC)	[thread overview]
Message-ID: <slrnifpo81.ut5.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D94904BD2D@Remus.metastack.local>

On 06-12-2010, David Allsopp <dra-news@metastack.com> wrote:
> zaid Khalid wrote:
>>
>
>> Hint I am using (Str.regexp)
>
> There are other libraries (e.g. pcre-ocaml) which provide different (I
> would say more powerful, rather than strictly better!)
> implementations.
>
>

There is also syntax extension like mikmatch, that helps to write regexp
in a very meaningful syntax:

match str with 
| RE bol "a"* | "ab"* eol ->
  true
| _ ->
  false

http://martin.jambon.free.fr/mikmatch-manual.html
http://martin.jambon.free.fr/mikmatch.html

You can use pcre and str with mikmatch.

Regards,
Sylvain Le Gall


  reply	other threads:[~2010-12-06 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 11:43 zaid khalid
2010-12-06 12:03 ` [Caml-list] " David Allsopp
2010-12-06 13:11   ` Sylvain Le Gall [this message]
2010-12-06 20:41     ` [Caml-list] " Martin Jambon
2010-12-06 17:31 ` Dawid Toton
2010-12-06 23:29 HELP : " zaid khalid

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=slrnifpo81.ut5.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).