in reply to Automatically generate regular expression from source data

If they have no particular format at all, what is you want to parse? If it's just "oh, match everything", I can offer you /.*/s, but I'm not sure that's very helpful.

Regular expressions are used for two things: validating, or extracting. For the former, you need to know what you want to match, and what you need to reject, for the second, you need to know what you want to extract.

You haven't given us any useful information.