From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=NO_REAL_NAME,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A57CCBBC4 for ; Mon, 30 Mar 2009 19:19:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0CAGub0EmBWB4FgWdsb2JhbACVC3oBARYitUuDegY X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="26649826" Received: from shiva.imag.fr ([129.88.30.5]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Mar 2009 19:19:11 +0200 Received: from trottinette.imag.fr (trottinette.imag.fr [129.88.34.202]) by shiva.imag.fr (8.13.8/8.13.8) with ESMTP id n2UHHqhN005932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 Mar 2009 19:17:52 +0200 Received: from trottinette.imag.fr (localhost.imag.fr [127.0.0.1]) by trottinette.imag.fr (8.13.8/8.13.8/ImagV2.1.feuille) with ESMTP id n2UHLT3j027161 for ; Mon, 30 Mar 2009 19:21:29 +0200 Received: (from apache@localhost) by trottinette.imag.fr (8.13.8/8.13.8/Submit) id n2UHLTux027160 for caml-list@yquem.inria.fr; Mon, 30 Mar 2009 19:21:29 +0200 X-Authentication-Warning: trottinette.imag.fr: apache set sender to ouchet@imag.fr using -f Received: from AGrenoble-156-1-5-57.w90-36.abo.wanadoo.fr (AGrenoble-156-1-5-57.w90-36.abo.wanadoo.fr [90.36.232.57]) by webmail.imag.fr (Horde Framework) with HTTP; Mon, 30 Mar 2009 19:21:29 +0200 Message-ID: <20090330192129.32152seaqvtmfb15@webmail.imag.fr> Date: Mon, 30 Mar 2009 19:21:29 +0200 From: Florent.Ouchet@imag.fr To: caml-list@yquem.inria.fr Subject: integer regular expressions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.2.2 X-MI2S-Agent: webmail 3.2.1 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (shiva.imag.fr [129.88.30.5]); Mon, 30 Mar 2009 19:17:52 +0200 (CEST) X-Spam: no; 0.00; syntax:01 semantics:01 pointers:01 integer:01 integer:01 int:01 int:01 expression:02 caml:02 match:02 imag:02 string:02 string:02 logical:04 expressions:04 Hello, I'm looking for a way to match integer numbers (immediate values), whose types may be either int, int32, int64 or big_int. A conversion to string in order to use string (perl compatible) regular expressions is likely not the solution I'm looking for because it will not allow integer specific matches. For instance (not normative), the regular expression syntax and semantics would allow complex matches such as "0%30" === "this integer matches if and only if its modulo to 30 is equal to 0". As in string regular expressions, operator | will implement a logical or... I googled a little but all the results are always related to string regular expressions :( any pointers? any existing Caml code? Thanks, Florent Ouchet