in reply to Perl Replace Help

This is quick and dirty, but it should do. At least it does in the test case. Whether it's hand-edited or machine-generated, I think it's safe to assume that we have no CR within a given formatting statement and each and every reference to 'Arial' will be in the context of font formatting (you are not usin this on a tipographer's site, right?)

This is the code:

use strict; while (<DATA>) { s/font-size:\s*10pt/font-size: 18pt/i; s/Times New Roman/Helvetica/i; print $_; } __DATA__ body { text-decoration: none; text-indent: 0in; text-align: left; lang: en-US; font-weight: normal; font-variant: normal; color: #000000; font-size: 10pt; font-style: normal; widows: 2; font-family: 'Times New Roman'; } <p dir="ltr" style="text-align: justify"><span style="font-weight: +bold; lang: en-US; font-size: 11pt; font-family: 'Arial'">Consultancy +</span></p>
This prints out:
body { text-decoration: none; text-indent: 0in; text-align: left; lang: en-US; font-weight: normal; font-variant: normal; color: #000000; font-size: 18pt; font-style: normal; widows: 2; font-family: 'Helvetica'; } <p dir="ltr" style="text-align: justify"><span style="font-weight: +bold; lang : en-US; font-size: 11pt; font-family: 'Arial'">Consultancy</span></p>