I'm trying to use regex in javascript to scrape some information from a website. At the moment, I have two separate matching patterns. The first extracts a table ...
/(?:<tbody>)(.*?)(?:<\/tbody>)/
whilst the second splits the returned content into rows...
/(?:<tr>)(.*?)(?:<\/tr>)/g
... now I was wondering if I could do this in one 'move', as it were. I want it to be ...
(?:<tbody>)((?:<tr>)(.*?)(?:<\/tr>))(?:<\/tbody>)/g
but no joy. Of course, I could use the .split method, but this doesn't fit with my broader process - I have an array of regex's which are foreach'd to extract the info I need.
Any help, much appreciated...