Article View: boeing.comp.unix
Article #4regular expression matching source code
From: Todd Waetzig
Date: Sat, 17 Feb 1996 03:35
Date: Sat, 17 Feb 1996 03:35
22 lines
1113 bytes
1113 bytes
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
Technical Details
Message-ID:
<DMwHzn.LIF@bcstec.ca.boeing.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!bcstec!waetzigShow Full Headers
Complete Article Headers
Newsgroups: boeing.comp.unix,comp.lang.c,comp.lang.c++,comp.sources.wanted Path: arc1-ca.pugleaf.net!in2.uu.net!bcstec!waetzig From: waetzig@bcstec.ca.boeing.com (Todd Waetzig) Subject: regular expression matching source code Message-ID: <DMwHzn.LIF@bcstec.ca.boeing.com> Organization: The Boeing Company Distribution: na Date: Sat, 17 Feb 1996 03:35:46 GMT