I have about 2,500 occurrences of code which fall into two distinct types.
Example A
- Code: Select all
<a href="image/mythicala.jpg" title="View image in new window"
onclick="newpop(this.href,'rel','415','570','0'); return false;">28 July Cabin Luncheon
<img src="image/mythicalz.jpg" width="85" height="120" alt="28 July 1950 Cabin Luncheon Menu cover"
/></a>
Example B
- Code: Select all
<a href="img/tktenv1950a.jpg" title="View image in new window"
onclick="newpop(this.href,'rel','570','350','0'); return false;">
<img src="img/tktenv1950az.jpg" width="195" height="116" alt="28 July train ticket envelope"
/><br />
Train Ticket Envelope</a>
The distinct difference between the two is that a <br/ > occurs only in Example B.
I'm attempting to place a small graphic to show that the links open a new window, using two CSS classes. In Example A the first line will become...
- Code: Select all
<a class="pu" href="image/mythicala.jpg" title="View image in new window"
Example B will have a span added to the bottom line viz...
- Code: Select all
<span class="ext">Train Ticket Envelope</span></a>
Could this be done with regex in 2 passes, bearing in mind that the start text of...
"a href" with "in new window" will be changed to
"a class="ext" href" with "in new window"
for no occurrence of <br /> before closing </a> in a first pass.
I have read and re-read regex help, both in UE and in Topstyle and I'm still very confused, despite several hours of trial and error...
...and as for macros - I'd not know where to begin.
Is my aim too ambitious? This is more or less the last step in my conversion from HTML 3.2 to accessible XHTML1.0 with CSS. I'm dreading the idea of having to change each entry manually one by one.
I've done one page to show <an example of the desired outcome>.
Any advice you could give would be very gratefully received - thanks.
Regards,
Steve (Peter S.)
Caronia II Timeline Webmaster
PS: I've been using UE since V4 - now 12.20


