Reputation: 88
I am currently attempting to implement a regular expression engine. (Yes, for fun. Go fig.)
I am working from this site for general algorithmic approach: http://swtch.com/~rsc/regexp/regexp1.html
My question for you all is: do you know of a collection of regular expressions and text strings that I can use as a comprehensive testbed for my engine? I've been searching and asking around for a couple days now, and can't find anything specific; maybe my google keyword-fu is lacking.
Thanks!
p.s. By way of example:
regexs:
strings:
Upvotes: 3
Views: 178
Reputation: 12204
Long ago I wrote a simple filename pattern matching function (file patterns are a special subset of regyular expressions). In the code (in C) I provided a few dozen test cases. You could probably adapt them for use with a regular expression matcher.
Source is at:
• http://david.tribble.com/src/fpattern.c
• http://david.tribble.com/src/fpattern.h
Upvotes: 2