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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B955FBBAF for ; Tue, 7 Dec 2010 00:36:20 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowBAC4C/UxiizTmlGdsb2JhbACUdTGOJwEBAQEJCwgJEQMfrn6CGYUbiQQBBAQBhUQEhF+JIg X-IronPort-AV: E=Sophos;i="4.59,307,1288566000"; d="scan'208";a="83224470" Received: from nm8-vm0.bullet.mail.ac4.yahoo.com ([98.139.52.230]) by mail2-smtp-roc.national.inria.fr with SMTP; 07 Dec 2010 00:36:19 +0100 Received: from [98.139.52.196] by nm8.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 23:36:18 -0000 Received: from [98.139.52.165] by tm9.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 23:36:18 -0000 Received: from [127.0.0.1] by omp1048.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 23:36:18 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 500697.68376.bm@omp1048.mail.ac4.yahoo.com Received: (qmail 91412 invoked by uid 60001); 6 Dec 2010 23:29:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291678177; bh=g9h2Z+omqnAqKZRAnJ4iuC+pUh+m+WxjknltRbnebeA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=V+MUEeYSwmr8adnRqhfolZl0nkfW145/GzwEKrVK5PBLFW/xfqUMyjFuCLOnqD7cf72usL690yUF8xhDsCJJcnrLrN1jeviPuYy++FGpbsjs0LSaR//RoV0B4VSMCOWvKTX1dV8z0tl6dtGeRLwuCcih60m4Ko0UkqKT0HUBvxY= 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=SJGY7qIwUsayNleYjRhwdl5FQ7JRAK53zVnBzc8t1PoNXXpqviWmppJtnesnNB7nTPiabwYZOT2MylhQiaI1C63x85b/wJ2MJvNcUBvRWVHKuIbCWgJ7tbiauUy54vQcchnhlG/AJlUc3tRmsd/RLRq1HlCrEzHmLPBl7wMqrnE=; Message-ID: <317197.91134.qm@web65412.mail.ac4.yahoo.com> X-YMail-OSG: 0r8xmoQVM1ntX3G7Byr5Q5O7HPWHodyN64BrDUVyEVDIeZA m0qWPzCnA24JIw2CWEHZt5ifjmAnbAZHImL1z6zhlaMOM_xWDZQA6.zh.ych 2NvORinsu_iHxJ6lo.NBko0Pw_5FmdOaaV8uuirFeSFCKudEGVDAV1CI_vi3 A7dtkcgdzSIosNNb5Hp6dp8fdAOsqQYZC_JhRF4tjkVYB6_eeSM7EKmZ9oRE jyap7xrmfRPMI1qGd_WfuigrTKdcWnC2VGf6a0MfZz4CH4rsADQxpCt2p256 sdp8cKtGI9G93iHNOucH__1HzfnjICmkQOzRf5g-- Received: from [94.173.177.99] by web65412.mail.ac4.yahoo.com via HTTP; Mon, 06 Dec 2010 15:29:37 PST X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Mon, 6 Dec 2010 15:29:37 -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-2010253898-1291678177=:91134" X-Spam: no; 0.00; regexp:01 pcre-ocaml:01 cheers:01 regexp:01 pcre-ocaml:01 cheers:01 aba:98 abb:98 aba:98 abb:98 define:02 define:02 expression:02 expression:02 match:02 --0-2010253898-1291678177=:91134 Content-Type: text/plain; charset=us-ascii Hi folks Thank you for all your replies. I think I am still struggling to find a solution to my issue using "Str.regexp", and using Pcre-ocaml needs some time to be familiar with as there is no enough examples and discussion on it. Ill put my issue again as if someone can help me to find a solution to it with the "Str" . I want to define regular expression and after that I want to check if particular string is a prefix of the given regular expression. Example: a* | (aba)* so when you test "abaaba" the result will be true (complete match) and when we check "abaa" the result is true as well but when we check "abb" the result is false. I look forward to your suggestions. Cheers, Zaid --0-2010253898-1291678177=:91134 Content-Type: text/html; charset=us-ascii
Hi folks

Thank you for all your replies. I think I am still struggling to find a solution to my issue using "Str.regexp", and using Pcre-ocaml needs some time to be familiar with as there is no enough examples and discussion on it.

Ill put my issue again as if someone can help me to find a solution to it with the "Str" .

I want to define regular expression and after that I want to check if particular string is a prefix of the given regular expression.

Example: a* | (aba)* so when you test "abaaba" the result will be true (complete match) and when we check "abaa" the result is true as well but when we check "abb" the result is false.

I look forward to your suggestions.

Cheers,
Zaid

--0-2010253898-1291678177=:91134--