Hi, for the last hour I have been trying to figure this out myself but I am just not having any success and thought maybe you could help.
Basically I am having a html email document that has a lot style
attributes for inline styling of elements that look somewhat like
<th rowspan="10" style="font-weight: normal; vertical-align: top; text-align: left;" width="87">
Now what I need to do is remove all thie white space so that it becomes:
<th rowspan="10" style="font-weight:normal;vertical-align:top;text-align:left;" width="87">
Playing around in http://www.gskinner.com/RegExr/ I have found this search expression
/style="([\w ;:\-0-9]+)"/gi
that matches only the style attribute with contents but I can't seem to figure out how to replace the white space only within the $1 capture group.
Ultimately I will run this for a project wide find and replace in TextMate in case that matters.
In case you haven't noticed I am a complete newbie to RegEx so please try to explain your solution so I can learn from them for future reference.
Many thanks for reading,
Jannis