quickregister 1 Posted January 6, 2018 Report Share Posted January 6, 2018 (edited) I am trying to get the url from this line in a table I have saved. Here is the line I want the url from: Please validate your registration by clicking on the following link: <a href=""http://www.bestinjurylawyerusa.com/classifieds/user/activate/11/Ha9XdOM8"">I want everything after :Please validate your registration by clicking on the following link: <a href=""and everything before:"" > To give me: http://www.bestinjurylawyerusa.com/classifieds/user/activate/11/Ha9XdOM8I used the Regex Builder 2.0 to get this regex code (?<=" >)(?=Please\ validate\ your\ registration\ by\ clicking\ on\ the\ following\ link\:\ \<a\ href\=\"\") However, I do not get anything when I run this code: clear list(%verification emails) set(#temp row, 0, "Global") loop($table total rows(&emails)) { add item to list(%verification emails, $find regular expression($list from text($table cell(&emails, #temp row, 5), $new line), "(?<=\" >)(?=Please\\ validate\\ your\\ registration\\ by\\ clicking\\ on\\ the\\ following\\ link\\:\\ \\<a\\ href\\=\\\"\\\")"), "Delete", "Global") increment(#temp row)Anybody have an idea what I am missing? When I use http://*/user/activate/*/* as the regex expression it does give me the url in this format http://www.bestinjurylawyerusa.com/classifieds/user/activate/11/Ha9XdOM8">http://www.bestinjurylawyerusa.com/classifieds/user/activate/Not sure how to get rid of the: " >http://www.bestinjurylawyerusa.com/classifieds/user/activate/Any help would be appreciated. Thank you! Edited January 6, 2018 by quickregister Quote Link to post Share on other sites
pash 504 Posted January 6, 2018 Report Share Posted January 6, 2018 Try alert($find regular expression("Please validate your registration by clicking on the following link: <a href=\"http://www.bestinjurylawyerusa.com/classifieds/user/activate/11/Ha9XdOM8\">","(?<=href=\").*?(?=\")")) Quote Link to post Share on other sites
quickregister 1 Posted January 6, 2018 Author Report Share Posted January 6, 2018 Thank you very much for your help Pash. I will work on this. Quote Link to post Share on other sites
quickregister 1 Posted January 6, 2018 Author Report Share Posted January 6, 2018 That worked for the text I gave you however actually I need to extract from this text: <html><head></head><body><p>Hi Matt,</p><p>Please validate your registration by clicking on the following link: <a href="http://www.bestinjurylawyerusa.com/classifieds/user/activate/12/97OZ8FEq">http://www.bestinjurylawyerusa.com/classifieds/user/activate/12/97OZ8FEq</a></p><p>Thank you!</p><p>Regards,</p><p><a href="http://www.bestinjurylawyerusa.com/classifieds/">Bestinjurylawyerusa Free Classifieds</a></p> </body></html> When I use: (?<=href=").*?(?=") I get: http://www.bestinjurylawyerusa.com/classifieds/user/activate/12/97OZ8FEq http://www.bestinjurylawyerusa.com/classifieds/ I need: http://www.bestinjurylawyerusa.com/classifieds/user/activate/12/97OZ8FEq I have tried using regex builder 2.0 to give me everything after link: <a href=" and before </a> It gives me this: (?<=\<\/a\>).(?=link\:\ \<a\ href\=\") Which does not produce any results. Any ideas? Thank you. Quote Link to post Share on other sites
quickregister 1 Posted January 6, 2018 Author Report Share Posted January 6, 2018 Figured it out. This worked. (?<= link: <a href=").*?(?=") 1 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.