http://www.perlmonks.org?node_id=822894

freakingwildchild has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monastery,

I guess my prayers need some answering in a quite diabolical matter ...

(1) To translate a regexp back to a readable value

Is there any "reverse regex" module, code or information available which explains how to get a regexp back to a fully conditioned string in Perl?
Like the regexp /^http:\/\/(?:www.)?youtube.com\/user\/(.*)\/$// could get translated back to an original string like http://www.youtube.com/user/username ?

(2) Translate a set of data to a regexp

To stay with regexes; is there way to create a regexp of different inputs when they look similar ? Like a data set of 10 url's, create a most compatible regexp from this?
This way regexp could be dynamic usable with a set of data; not bothering the user at all to search for the best options...

Hoping to find enlightenment,
FWc.