Thread View: boeing.comp.unix
2 messages
2 total messages
Started by Todd Waetzig
Sat, 17 Feb 1996 03:35
regular expression matching source code
Author: 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
Re: regular expression matching source code
Author: Christophe Benoit
Date: Sun, 18 Feb 1996 22:37
Date: Sun, 18 Feb 1996 22:37
20 lines
1075 bytes
1075 bytes
Todd Waetzig wrote: > > 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. > You should use a set of basic/container classes. The library 'Tools.h++' of Rogue Wave give a response to your problem and to many others. -- Christophe BENOIT PARIS (FRANCE) email : cbenoit@imaginet.fr compuserve : 100621,774 (1) 44 68 00 04 (1) 49 02 13 29
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads