Article View: boeing.comp.unix
Article #2Re: regular expression matching source code
From: Maurizio Loreti
Date: Fri, 23 Feb 1996 07:51
Date: Fri, 23 Feb 1996 07:51
30 lines
1743 bytes
1743 bytes
In article <DMwHzn.LIF@bcstec.ca.boeing.com>, waetzig@bcstec.ca.boeing.com (Todd Waetzig) writes:
>I am looking for the 'C' or 'C++' source for a function to
>perform a match of a string. This function would
>use the syntax of regular expressions. This regular
>expression matching would be similar to that used by
>grep and sed.
>
>Ideally it would look something like
>
>if (match("^1([A-Z]*|[0-9]*)Z?",string_to_search) == 0)
> printf("match found ");
>
>this would match a string_to_search if it
> began with a digit 1
> followed by any number of occurences of uppercase letters
> or by any number of occurrences of digits
> followed by zero or one occurrence of the letter Z
>
>Thanks,
>
>--
>Todd Waetzig Programmer/Analyst Boeing Computer Services
> waetzig@bcstec.ca.boeing.com
Have a look at the 'regexp' package of the FSF; available from
prep.ai.mit.edu:/pub/gnu - of finger fsf@prep.ai.mit.edu for a list of
mirrors. Good luck...
--
Maurizio Loreti http://mvxpd5.pd.infn.it/wwwcdf/mlo.html
Un. of Padova, Dept. of Physics - Padova, Italy loreti@padova.infn.it
Technical Details
Message-ID:
<Dn7xuG.Ay1@news.cern.ch>Path:
arc1-ca.pugleaf.net!mxsld2.pd.infn.it!LORETIReferences:
<DMwHzn.LIF@bcstec.ca.boeing.com>Show Full Headers
Complete Article Headers
Newsgroups: boeing.comp.unix,comp.lang.c,comp.lang.c++,comp.sources.wanted Path: arc1-ca.pugleaf.net!mxsld2.pd.infn.it!LORETI From: loreti@mxsld2.pd.infn.it (Maurizio Loreti) Subject: Re: regular expression matching source code X-Nntp-Posting-Host: mxsld2.pd.infn.it Message-ID: <Dn7xuG.Ay1@news.cern.ch> Sender: news@news.cern.ch (USENET News System) Reply-To: loreti@mxsld2.pd.infn.it Organization: I.N.F.N. Padova - CDF/CMS VAXcluster References: <DMwHzn.LIF@bcstec.ca.boeing.com> Distribution: na Date: Fri, 23 Feb 1996 07:51:50 GMT