From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 27FF7BBAF for ; Mon, 6 Dec 2010 12:50:00 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsEAIRc/ExiizT6gGdsb2JhbACUbTGOKQEBCwsKBRMDH60rghmEJ4kEAQQEAYVEBIRfiSI X-IronPort-AV: E=Sophos;i="4.59,305,1288566000"; d="scan'208";a="82075962" Received: from nm30-vm0.bullet.mail.ac4.yahoo.com ([98.139.52.250]) by mail4-smtp-sop.national.inria.fr with SMTP; 06 Dec 2010 12:49:59 +0100 Received: from [98.139.52.189] by nm30.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 11:49:58 -0000 Received: from [98.139.52.150] by tm2.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 11:49:58 -0000 Received: from [127.0.0.1] by omp1033.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 11:49:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 12226.15059.bm@omp1033.mail.ac4.yahoo.com Received: (qmail 89153 invoked by uid 60001); 6 Dec 2010 11:43:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291635797; bh=sWFnhGiBX7U83VkVIRk1ih79Dn8yWxkX2z82ZOqQe5w=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=helc84jaLIX+tvrb6zIF20kX0UIAqitp+tu9529cigRF4tZ8Hdla5+yUAKTwffLoAtkE4gscW3giADSUjAlBY41Q2FrYXfz1SC76IJWl3WMaVyBNW8Hk4TYTpuwLKkIjZUlkuecOri269TKc+LTh4bAs+8peXnfs+HxRaW7G2EI= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=i72HKIEUbvWZw7mMLgLHhHa5H0/10EfQLQhD34N7OEOZaxEGdIyLtxuh2pUTxIA0/ZKTnIwlmX3U1yeL2ejNyOS3krJa4nYF6JYdA9SGss4aaoCNxu6/gPJjaOMrGvzfIuk3P1fXmmZGS6VqlyYBk1rxQLHHM0hWtDfu0JQmfPA=; Message-ID: <926418.88102.qm@web65410.mail.ac4.yahoo.com> X-YMail-OSG: OtezTR0VM1kbyCAihDciegXXxNsbGv80Df7KdT5zFT6ke_T UhBcq9wAZlgiI20HOItsmUUPc6IG07LYtDqFJxMCPCbTT50vhtw8qmCX6mwE q7D0na3KaNPKUJEkDCRr1GZ31TxjVISXGa_DPfpXPWh4E9fSiIQCjQN5aj6z Ku0TJ5LwpNaz9d9jOJji14_CP3OPWKr9xt5qiKmsQNeh1AfG17jRtLLgnjWM 4Uiq.vgB4lzYGMKQ9NJoQzl1fjU1YLRjnTk310yAUL4_B8o6HkWaNZJ1Q3GU D2GUsd106pxxDNSPY81KcqS3IYVGJzYUokFiRmpYUugm4G3KML9Jd_1RHBXs tdneqrA-- Received: from [147.188.192.41] by web65410.mail.ac4.yahoo.com via HTTP; Mon, 06 Dec 2010 03:43:17 PST X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Mon, 6 Dec 2010 03:43:17 -0800 (PST) From: zaid khalid Subject: help with regular expression To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1446877188-1291635797=:88102" X-Spam: no; 0.00; ocaml:01 ocaml:01 syntax:01 regexp:01 syntax:01 regexp:01 aba:98 aba:98 matched:01 matched:01 strings:01 strings:01 expression:02 expression:02 string:02 --0-1446877188-1291635797=:88102 Content-Type: text/plain; charset=us-ascii 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 --0-1446877188-1291635797=:88102 Content-Type: text/html; charset=us-ascii
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


--0-1446877188-1291635797=:88102--