开发者

How do I stop looping a regex expression

I am trying to extract information from a table on a web page with source information like

    team.php?t=4636&s=98700">Memphis</a>          CUSA   1-11   117 ...
    team.php?t=66&s=98700">Akron</a>            MAC    ...
etc

I get the information I am -college names - after using regex

team.php.*?>(.*?)<

The problem is that there is another similar table on the web page and this info also gets up There is some intervening text I can use to stop the process, say 'Table 2', but am not sure how to incorporate it i开发者_如何转开发nto the expression

TIA

Further to comments below. The original is here I just want to extract the team names about a third of the way across, Oregon, auburn etc without the conferences at bottom of column

I have created < a href="http://www.premiersoccerstats.com/collegerankingsxml.htm"> xml dom and parsed it as best I can showing the college and a link but this does not give me just the set of colleges I am after


This regex works on a copy-paste of the text from the website: (\d+ [A-Z][a-z](?:[^\d\s]\s?)+).

If you want to avoid getting the values three times, use a loop, with i starting at 1:" ("+ i +" [A-Z][a-z](?:[^\d\s]\s?)+)"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜