Help with Regex to get images
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
isaac2004 <levin.is... @gmail.com>
Date: Tue, 12 May 2009 20:51:59 -0700 (PDT)
Local: Tues, May 12 2009 11:51 pm
Subject: Help with Regex to get images
hi,
im trying to get the playerId for a baseball player from ESPN's
website. the info is in a link like so
<a href="/mlb/players/profile?playerId=6195">Hanley Ramirez</a></td>
im trying to just get the 6195 but am having some trouble doing it.
can someone help me. thanks
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Eugeny Sattler <eugeny.satt... @gmail.com>
Date: Mon, 18 May 2009 15:50:33 +0500
Local: Mon, May 18 2009 6:50 am
Subject: Re: Help with Regex to get images
(view this in non-proportional font like Courier) why not use just /mlb/players/profile\?playerId=(\d+)\"\>([^<]+)\</a> \__/ \___/ │ │ $1 will catch │ numeric playerID │ │ $2 will catch player name
i would add optional spaces \s* , just in case: /mlb/players/profile\?playerId=(\d+)\s*\"\s*\>\s*([^<]+)\s*\</a>
On Wed, May 13, 2009 at 8:51 AM, isaac2004 <levin.is
... @gmail.com> wrote:
> hi, > im trying to get the playerId for a baseball player from ESPN's > website. the info is in a link like so
> <a href="/mlb/players/profile?playerId=6195">Hanley Ramirez</a></td>
> im trying to just get the 6195 but am having some trouble doing it. > can someone help me. thanks
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
DuCakedHare <dch.... @googlemail.com>
Date: Thu, 4 Jun 2009 03:34:37 -0700 (PDT)
Local: Thurs, Jun 4 2009 6:34 am
Subject: Re: Help with Regex to get images
In minimalist fashion, for future:
\?playerId=(\d+).*?>(.+)</a>
You only need to identify the playerId item and extract the number,
whatever the path to that ID
After that, if for some reason another tag appears after that, it will
be ignored.
Assuming it's in a A element, then the closing </a> is sufficent to
detect.
On May 13, 4:51 am, isaac2004 <levin.is... @gmail.com> wrote:
> <a href="/mlb/players/profile?playerId=6195">Hanley Ramirez</a></td>
> im trying to just get the 6195 but am having some trouble doing it.
You must
Sign in before you can post messages.
You do not have the permission required to post.