Biks 9 Posted February 22, 2018 Report Share Posted February 22, 2018 I've done this a million times, now I can't. Just trying to scrape emails. In an earlier version of Ubot, this regex code worked for scraping emails (NODE VIEW): (\([A-Z0-9._%-])+@([A-Z0-9.-]+)\.([A-Z]{2,4})(\ But in CODE VIEW I see this: (\\([A-Z0-9._%-])+@([A-Z0-9.-]+)\\.([A-Z]\{2,4\})(\\ It's adding more slashes. What's going on? When someone says USE THIS REGEX code, do I paste it NODE or CODE view? This regex code is supposed to scrape all variations of emails: [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,})?$ It doesn't work for me when I paste it in NODE view. When I paste it in CODE view, it says I have errors on char 65, 67, 71. What does an email capture regex code look like before I paste it into NODE view, and what will it look like in CODE view? ** 60 MINUTES LATER ** OK, this works: http://www.rubular.com/r/nidQpOizwC (\w+(\s|)@(\s|)[a-zA-Z_]+?\.[a-zA-Z]{2,3}) But that won't get any [at] or {AT} versions. (as in the long one above - anyone have that?) Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 22, 2018 Report Share Posted February 22, 2018 The extra slash is an escape character - basically when you paste in node view you don't need to escape anything but when you switch to code view it will automatically escape some characters. As for your regex maybe try this modification: (\w+(\s|)(@|\Wat\W)(\s|)[a-zA-Z_]+?\.[a-zA-Z]{2,3}) 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.