Jump to content
UBot Underground

Using Regex To Get Url From Line In Table

Recommended Posts

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:


I 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


Not sure how to get rid of the:

" >http://www.bestinjurylawyerusa.com/classifieds/user/activate/

Any help would be appreciated.  Thank you!

Edited by quickregister
Link to post
Share on other sites


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=\").*?(?=\")"))
Link to post
Share on other sites

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>


When I use:


I get:



I need:


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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...