Thanks, all for the suggestions. Richard, that code is a masterpeice. I have no problems with regexs, though, only with the regex that I wasn't doing properly. Roman, I'm still picking your code apart and trying to understand everything. I see I'll be learning quite a bit from that. Arpad, I'll try your code soon. As it seems to be the shortest, it would suggest that it is most maintainable as well and I'd like to use it. Thanks, everybody. Dotan Cohen http://what-is-what.com/what_is/xhtml.html http://lyricslist.com/lyrics/lyrics/69/64/beatles/sgt_pepper_s_lonely_hearts_club_band.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php