From: zaid khalid <zaidbenaz@yahoo.com>
To: caml-list@yquem.inria.fr
Subject: help with regular expression
Date: Mon, 6 Dec 2010 03:43:17 -0800 (PST) [thread overview]
Message-ID: <926418.88102.qm@web65410.mail.ac4.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
Hi Folks
I want some help in writing regular expressions in Ocaml, as I know how to write it in informal way but in Ocaml syntax I can not. For example I want to write "a* | (aba)* ".
Another question if I want the string to be matched against the regular expression to be matched as whole string not as substring what symbol I need to attach to the substring, i.e if I want only concrete strings accepted (like (" ", a , aa , aaa, aba, abaaba), but not ab or not abaa).
Hint I am using (Str.regexp)
Thanks
[-- Attachment #2: Type: text/html, Size: 667 bytes --]
next reply other threads:[~2010-12-06 11:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 11:43 zaid khalid [this message]
2010-12-06 12:03 ` [Caml-list] " David Allsopp
2010-12-06 13:11 ` Sylvain Le Gall
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=926418.88102.qm@web65410.mail.ac4.yahoo.com \
--to=zaidbenaz@yahoo.com \
--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