From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d0d259074af661a2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-29 04:35:28 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: regex with ada? Date: 29 Dec 2001 04:35:28 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0112290435.43c19f69@posting.google.com> References: NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1009629328 9561 127.0.0.1 (29 Dec 2001 12:35:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 Dec 2001 12:35:28 GMT Xref: archiver1.google.com comp.lang.ada:18375 Date: 2001-12-29T12:35:28+00:00 List-Id: Eric Merritt wrote in message news:... > > > I am afraid I feel the overwhelming compulsion to > point out the regular expresions are quite allot more > then simply wildcards. That being said, I am glad to > know thier is a gnat extension that supports them. There are actually several packages that are relevant in GNAT (GNAT.Regexp, GNAT.Regpat, and GNAT.Spitbol.Patterns). The first two support regular expressions Unix-style in two different flavors, the third supports the much more powerful notion of pattern matching and replacement found in SNOBOL-4. Note that these are not extensions, they are simply Ada packages supplied with GNAT. It is conceivable that they might be adapted to work with other Ada compilers, though likely you will have trouble with unsupported pragmas and attributes (the GNAT packages feel quite free to use GNAT pragmas and attributes, and in some cases, these uses are quite fundamental, e.g. the use of Unrestricted_Access in the GNAT.Spitbol.Patterns. Robert Dewar