Xcemp 0 Posted November 29, 2014 Report Share Posted November 29, 2014 So I am scraping the inner text of an email, but need to scrape a confirmation code. The confirmation code has its only line in this format password: (password deleted) confirmation code: TK28467851 (please note: this is not your password) How do I isolate the confirmation code in this case TK28467851 from the rest of the innertext? As the confirmation code changes on each email.Thanks Quote Link to post Share on other sites
Marton 48 Posted November 29, 2014 Report Share Posted November 29, 2014 This should do: http://regexhero.net/tester/?id=3b9d1c3e-f33e-4b19-8c4c-ffc0fd396ee9 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted November 30, 2014 Report Share Posted November 30, 2014 This should do: http://regexhero.net/tester/?id=3b9d1c3e-f33e-4b19-8c4c-ffc0fd396ee9 haha, been using this site forever. I wish I knew could do that link business. Quote Link to post Share on other sites
Marton 48 Posted November 30, 2014 Report Share Posted November 30, 2014 haha, been using this site forever. I wish I knew could do that link business. Yeah man, I absolutely love it! Especially the benchmark feature, you can really optimize your regex there. You can also subscribe for a full version, it's easily worth it. Marton Quote Link to post Share on other sites
Team_LX 3 Posted November 30, 2014 Report Share Posted November 30, 2014 [A-Z-0-9]{10} or this ([A-Z])\w+ ??? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted November 30, 2014 Report Share Posted November 30, 2014 [A-Z-0-9]{10} or this ([A-Z])\w+ ??? For what? (?<=confirmation code: ).* for the original post In case you don't have Silverlight or something. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.