Lends itself to a one liner inplace edit (writes orig to orig.bak)
perl -pi.bak -e 's/background-color:\s*#(?:[0-9a-f]{6}|[0-9a-f]{3})\s* +;?/background-color: #FFFFFF;/i' <INFILE>
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Escaping '#' in a regexp
by tachyon
in thread Escaping '#' in a regexp
by Tricky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |