in reply to
Automatically generate regular expression from source data
An example might be helpful here.
But still, there must be some method to how you determine what regexes to apply that you could codify? Perhaps you need a parser like Parse::Yapp, Regexp::Grammars, Parser::MGC or Parse::RecDescent instead of a regex.
Results (49 votes),