En Thu, 31 Jan 2008 01:01:30 -0200, Astan Chee <[EMAIL PROTECTED]> escribió:
> I have a html text stored as a string. Now I want to go through this
> string and find all 6 digit numbers and make links from them.
> Im using re.sub and for some reason its not picking up the previously
> matched cond
"Astan Chee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have a html text stored as a string. Now I want to go through this
> string and find all 6 digit numbers and make links from them.
> Im using re.sub and for some reason its not picking up the previously
> matched
See this:
http://www.regular-expressions.info/python.html
(the Search and Replace part)
You are referring to the group as "(?P=id)", when you should be using
r"\g".
HTH,
Sergio
On Jan 30, 2008 10:01 PM, Astan Chee <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a html text stored as a string. Now I w
Hi,
I have a html text stored as a string. Now I want to go through this
string and find all 6 digit numbers and make links from them.
Im using re.sub and for some reason its not picking up the previously
matched condition. Am I doing something wrong? This is what my code
looks like:
htmlStr = r