Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!texbell!texsun!newstop!sun!imagen!qmsseq!pipkins From: pipkins@qmsseq.imagen.com (Jeff Pipkins) Newsgroups: comp.sys.ibm.pc Subject: Re: Pattern Matching for the PC Message-ID: <46@qmsseq.imagen.com> Date: 14 Nov 89 15:21:08 GMT References: <67975@philabs.Philips.Com> Reply-To: pipkins@qmsseq.UUCP (Jeff Pipkins) Organization: QMS Inc., Mobile, Alabama Lines: 25 In article <67975@philabs.Philips.Com> brb@briar.philips.com (Brian Bertan;6309;4.88;$0202) writes: > >I am interested in C and Pascal source code or libraries having extensive >string parsing functions including pattern matching with regular expressions. >If no source or library is available, is there any literature describing how to >implement the above? Check out a book called "Software Tools" by Brian Kernighan and P.J. Plauger, published by Addison Wesley. This book is one of the classics and most unix programs that support regular expressions most likely use some derivation of their algorithms. The code is in C and RATFOR; there is a Pascal =8-Q version of the book available, called "Software Tools in Pascal". Dr. Dobb's Journal (M&T Publishing) has a version of grep written by Alan Hollub that is also available (I think it's about $15). There are better ways of dealing with regular expressions than are presented in either of these references, but I haven't seen code readily available for them. If you want to know more about regular expressions and language theory in general, check out "Compilers -- Principles, Techniques, and Tools" by Aho, Sethi, and Ullman, and "Introduction to Automata Theory, Languages, and Computation" by Hopcroft and Ullman. Both books are published by Addison Wesley, with which I am totally unaffiliated except for the fact that I have a lot of their books and they have a LOT of my money!