botmaker7 5 Posted November 10, 2017 Report Share Posted November 10, 2017 List1: google.comnewsweek.comcaller.comwashingtonpost.comyahoo.comfacebook.comcleveland.comfoxsports.com List2: sportsnet.comgoogle.comyahoo.comthegaurdian.comclevelandmugshot Entries removed: google.comyahoo.comcleveland.com - What's the most efficient way to do this? Increment through list2 and loop some kind of if / regex statement on list one? Quote Link to post Share on other sites
Pete 121 Posted November 10, 2017 Report Share Posted November 10, 2017 if you want to do it with regex this is one way clear all data set(#list1,"google.com newsweek.com caller.com washingtonpost.com yahoo.com facebook.com cleveland.com foxsports.com","Global") set(#list2,"sportsnet.com google.com yahoo.com thegaurdian.com cleveland mugshot","Global") set(#output,$replace regular expression($replace regular expression(#list2,"\\b(?:{$replace regular expression(#list1,"\\r?\\n","|")})\\b",$nothing),"\\r?\\n\\s",$nothing),"Global") note cleveland.com in list 1 and cleveland are not a match 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 10, 2017 Report Share Posted November 10, 2017 Use subtract lists: add list to list(%list1,$list from text("google.com newsweek.com caller.com washingtonpost.com yahoo.com facebook.com cleveland.com foxsports.com",$new line),"Delete","Global") add list to list(%list2,$list from text("sportsnet.com google.com yahoo.com thegaurdian.com cleveland mugshot",$new line),"Delete","Global") add list to list(%list3,$subtract lists(%list1,%list2),"Delete","Global") 1 Quote Link to post Share on other sites
botmaker7 5 Posted November 13, 2017 Author Report Share Posted November 13, 2017 Thanks guys!!!! Much appreciated. 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.