I have to match multiple things in a regex and on top of that I need to match things in pairs. To keep things in insertion order I was thinking of creating an array and just combining match1::match2 and ripping through them later on. But since I need the URL and name for each of the urls, that's a little much for an array, isn't it?
Code I need to match is as follows
There are hundreds of these matches per page and I NEED to pair up the first and second link of each match. Also, the TR CLASS alternates between "g" and "h" each time.<TR class=g><TD class=i><A href="/page1.html">Page name here</A></TD>< +TD class=j><A href="/page2.html">Other page name here</A></TD></TR> <TR class=h><TD class=i><A href="/blahblah.html">lah blah</A></TD><TD +class=j><A href="/ribbit.html">Ribbit</A></TD></TR>
Any advice on the regex to use for this to mach the URL and the title of each set AND how to group this together for easy access later (preferrably in the order it's found) would be great.
In reply to multiple regex matching by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |