Regex help needed!

Aahz aahz at pythoncraft.com
Thu Jan 7 21:42:56 CET 2010


In article <19de1d6e-5ba9-42b5-9221-ed7246e39b4a at u36g2000prn.googlegroups.com>,
Oltmans  <rolf.oltmans at gmail.com> wrote:
>
>I've written this regex that's kind of working
>re.findall("\w+\s*\W+amazon_(\d+)",str)
>
>but I was just wondering that there might be a better RegEx to do that
>same thing. Can you kindly suggest a better/improved Regex. Thank you
>in advance.

'Some people, when confronted with a problem, think "I know, I'll use
regular expressions."  Now they have two problems.'
--Jamie Zawinski

Take the advice other people gave you and use BeautifulSoup.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list