Are there tools out there to measure code coverage of regexes? A tool that given a regex and a list of input strings, tells you which parts of the regex are exercised, with measures analogous to statement coverage, branch coverage, condition coverage, etc.
I don't care much what language or environment it runs in.
(Update: after some more thought, I was realizing that it's pretty easy to start with a regex and generate various exemplars. There are some tools out there to do this: http://research.microsoft.com/en-us/projects/rex/ , http://code.google.com/p/xeger/ ). They don't seem to try to get full coverage, though; they just take random paths through the DFA.)