I have a text file that contains a list of regexp's which I regularly use to clean html files according:
list.txt
<p[^>]*>|<p>
<\/?(font|span)[^>]*>|
<\/u>\s*<u>|
<\/u>\s*<i>\s*<u>|<i>
if each line consisted of the form "#{a}|#{b}", what would be the simplest way to both read and convert this file into the array:
[
[ /<p[^>]*>/, '<p>' ],
[ /<\/?(font|span)[^>]*>/, '' ],
[ /<\/u>\s*<u>/, '' ],
[ /<\/u>\s*<i>\s*<u>/, '<i>' ]
]