jjasc 0 Posted July 28, 2010 Report Share Posted July 28, 2010 Hey, I'm trying to basically extract the domains from a list of spun resource boxes. Say I have a file with the following three entries (separated by a line break) If {you are|you're} {looking for|searching for|trying to find|seeking|in search of|in need of} information on <a href="http://www.cnn.com">{search engine help|example test|bad anchor text 2| just another example anchor text}</a>If {you are|you're} {looking for|searching for|trying to find|seeking|in search of|in need of} information on <a href="http://www.dobe.com">{search engine optimization| SEO| more SEO anchor text}.</a>If {you are|you're} {looking for|searching for|trying to find|seeking|in search of|in need of} information on <a href="http://www.mywebsitedomain.com">{some anchor text|even more text here}</a> How can I extract only the domains to a new list, so that I get this: http://www.cnn.comhttp://www.dobe.comhttp://www.mywebsitedomain.com I'm thinking I might need to use some sort of .replace with regular expressions and javascript? If anyone can give me a hand here, much appreciated! Ben Quote Link to post Share on other sites
MiriamMB 63 Posted July 28, 2010 Report Share Posted July 28, 2010 Your problem sounds similar to this one discussed on this thread: http://ubotstudio.com/forum/index.php?/topic/4417-pull-a-middle-bit-out-of-a-link/page__fromsearch__1 Take a look at the solution and see if it can help solve yours. Quote Link to post Share on other sites
jjasc 0 Posted July 29, 2010 Author Report Share Posted July 29, 2010 Thanks, gave me an idea. I'll just "split" the text using the List from Text on the " delimiter. That will break each "line" into 3 items on a new list. At that point, I can just pick out every even numbered item on the new list -- that will be the domain. Quote Link to post Share on other sites
MiriamMB 63 Posted July 29, 2010 Report Share Posted July 29, 2010 great! ideas are good 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.