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!)
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: 22.214.171.124 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.
- Dave Ferreira (email@example.com)
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.