in reply to How regexes fail.

Something similar was asked in this thread. Perhaps it will help you.

Cheers,

JohnGG