whoami 26 Posted March 31, 2015 Report Share Posted March 31, 2015 Hello guys..Having issues with my Regex for grabbing emails.It is grabbing emails with a dot at the end when it doesnt have a .au or .mx or anything.They are likeusername@hotmail.com.user2@yahoo.com. and I want to:username@hotmail.comuser2@yahoo.com This is the regex I am using: $find regular expression(#ScrapeGoogle1, "[\\.\\-_A-Za-z0-9]+?@[\\.\\-A-Za-z0-9]+?[\\.A-Za-z0-9]\{2,\}")and $find regular expression($document text, "[a-zA-Z0-9\\._\\-]\{3,\}(@|AT|\\s(at|AT)\\s|\\s*[\\[\\(\\\{]\\s*(at|AT)\\s*[\\]\\\}\\)]\\s*)[a-zA-Z]\{3,\}(\\.|DOT|\\s(dot|DOT)\\s|\\s*[\\[\\(\\\{]\\s*(dot|DOT)\\s*[\\]\\\}\\)]\\s^*)[a-zA-Z]\{2,\}((\\.|DOT|\\s(dot|DOT)\\s|\\s*[\\[\\(\\\{]\\s*(dot|DOT)\\s*[\\]\\\}\\)]\\s*)[a-zA-Z]\{2,\})?$")Any ideas? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted March 31, 2015 Report Share Posted March 31, 2015 once you have emails passthru a $replace regex \.$|\.\s \.$gets the last one \.\sgets the rest CD 1 Quote Link to post Share on other sites
a2mateit 395 Posted April 1, 2015 Report Share Posted April 1, 2015 Nice one CD! Quote Link to post Share on other sites
whoami 26 Posted April 24, 2015 Author Report Share Posted April 24, 2015 So the proper thing to iterate the list which would be to the current list position value. There is no commands to do that. Kinda confused how to proceed.Else I will do it via table, would be easier.Thanks a lot for this! 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 25, 2015 Report Share Posted April 25, 2015 So the proper thing to iterate the list which would be to the current list position value. There is no commands to do that. Kinda confused how to proceed.Else I will do it via table, would be easier.Thanks a lot for this! Set a variable to be 0 before a loop, each iteration of the loop increment the variable unless you remove the list item then don't increment. The variable is the list item number that you can use for the list item in the regex. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted April 26, 2015 Report Share Posted April 26, 2015 you are welcome no sir, avoid loops set(#scraped emails, "username@hotmail.com.user2@yahoo.com.", "Global")set(#filter, $replace regular expression(#scraped emails, "\\.$|\\.\\s", $new line), "Global") scrape into a large listput $large list return into replace function something like this plugin command("Bigtable.dll", "Clear all large list")plugin command("Bigtable.dll", "large List from Regex", "google scrape", $document text, "your email regex", "replace")plugin command("Bigtable.dll", "large List from text", "filtered", $replace regular expression($plugin function("Bigtable.dll", "Large list return", "google scrape"), "\\.$|\\.\\s", $new line), $new line, "replace") assuming you are using the browser simple example but should get you where you need to be CD 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.