[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] file parsing



Fort a project I've been assigned. I have a set of files (flora.html,
flora2.html, flora3.html...) which access "higher files"
(flora/flora-01.s.html...) And the higher files would be best to be created all
at once. but I need to parse a series of 3things from the regular files.

#####the needing to be parsed auditorium2.html
##### the [...] and the parentheses are my adding

<tr height="235" valign="top" align="center">
  <td [...]><a href="auditorium/(((Aud-19))).s.html" > [...]
    <p class="body">(((Southeast corner of Auditorium)))<br>
    <font class="body0">(((Jan. 1998)))</font></td>
  <td [...]><a href="auditorium/(((Aud-20))).s.html" > [...]
    <p class="body">(((Southeast corner)))<br>
    <font class="body0">(((Jan. 1998)))</font></td>
  <td [...]><a href="auditorium/(((Aud-21))).s.html" > [...]
    <p class="body">(((Case for notices at southeast corner)))<br>
    <font class="body0">(((Jan. 1998)))</font></td>
</tr>

#####thusly to...

$auditorium{'Aud-19'}{'title'} = 'Southeast corner of Auditorium';
$auditorium{'Aud-19'}{'date'} = 'Jan. 1998';
$auditorium{'Aud-20'}{'title'} = 'Southeast corner';
$auditorium{'Aud-20'}{'date'} = 'Jan. 1998';
$auditorium{'Aud-21'}{'title'} = 'Case for notices at southeast corner';
$auditorium{'Aud-21'}{'date'} = 'Jan. 1998';

I guess what the biggest problem I'm having is how can I treat...

<td [...]><a href="auditorium/Aud-19.s.html" > [...]
  <p class="body">Southeast corner of Auditorium<br>
  <font class="body0">Jan. 1998</font></td>

...as one unit when there are three lines. (i.e. associate 'Aud-19' to
'Southeast corner of Auditorium' and 'Jan. 1998')

le meas,
--nick

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org