Your search query "linkto%3A%22Asking for Help%2FHow to use Reg. Exp. to capture data from random text%22" didn't return any results. Please change some terms and refer to HelpOnSearching for more information.
(!) Consider performing a full-text search with your search terms.

Clear message

Asking for Help: How to use reg. exp. to capture defined values from random text


(Note to admins ... this is my second attempt to add this page. The first time my carefully-crafted text was discarded by the confusing form to create this page. Thanks for that!)

Hi -

I'm a Python newbie. I HAVE and WILL CONTINUE to study the usages of regular expressions. But in the meantime, I'd appreciate any quick help that y'all can give me.

I'd like to learn how to capture data points defined by some known marker ('=', ':' or other) from random text. For example, I'd like to capture "date" and "ip address" from random text like:

"bla bla bla, loads of random data date = 03/04/2010 more random text ip address: thanks for your help"

To clarify, I know the NAME of the value, I know the marker, I want to grab the value.

Thanks much for your help.

When answering questions, add the CategoryAskingForHelpAnswered category when saving the page. This will move the link to this page from the questions section to the answers section on the Asking for Help page.


Unable to edit the page? See the FrontPage for instructions.