Pazman 32 Posted May 25, 2013 Report Share Posted May 25, 2013 I have been using Edit Pad to test my REGEX out and it is usually seamless to bring it over to Ubot, however, this timeI cannot get the Edit pad REGEX to work on Ubot. Does anyone notice where the error is? Here is my starting point (what I want is between the (Start HERE) and the (<=STOP Here) LinkedIn ------------ (Start HERE) "you can feel free to add your email and continue the thread: aaa@instructor.net aaa@travelinfosys.com aaa@aim.com aaa@lawyer.com traveltechnology@aol.com aaaa@msn.com aaaa@consultant.com aaaa@natsr.com aaaa@aim.com aaaa@instructor.net aaaa@dr.com aaaa@programmer.net aaa@graphic-designer.com aaa@inccorporate.com aaaa@financier.com" Posted by Paul Stanley Go to complete discussion: http://www.linkedin.com/e/-k1c4bj-haknapgo-2s/vaq/136944132/4540772/108390110/view_disc/?hs=false&tok=1eZIMYx5iwFlw1 (<=STOP Here) Send me an email for each new discussion » http://www.linkedin.com/e/-k1c4bj-haknapgo-2s/snp/4540772/true/grp_email_subscribe_new_posts/?hs=false&tok=0uiO51uD6wFlw1 Subscribe to new posts: http://www.linkedin.com/e/-k1c4bj-haknapgo-2s/snp/4540772/true/grp_email_subscribe_new_posts/?hs=false&tok=0uiO51uD6wFlw1 Here is the REGEX that works on Edit Pad BUT not in Ubot: (?<=)^\"([A-Za-z0-9\-\n\@ \:\.\'\,\"\/\_\?\=\&]+)w1(?=$\n) I appreciate any insight you can offer. Quote Link to post Share on other sites
VaultBoss 310 Posted May 25, 2013 Report Share Posted May 25, 2013 There are many flavours of REGEX, UBS uses the .Net regex. You need to test in place where they use the exact same flavour to make sure your regex works in UBS. Dunno about your sw, what type of flavour uses (go check see if they have advanced options or some such, or check their site's FAQ for help to find out) Till then, you can use this safely as a playground: http://regexhero.net/tester/ Hope this helps you...Cheers! Quote Link to post Share on other sites
Pazman 32 Posted May 25, 2013 Author Report Share Posted May 25, 2013 VaultBoss thanks, however, still the same issues. I have had various codes that work and still the same thing. Works in Edit Plus and regexhero is fine too, but NOT Ubot Is it possible that there are issues with the data coming from a csv? I am pulling a cell from a csv file and trying to manipulate the data. Quote Link to post Share on other sites
VaultBoss 310 Posted May 25, 2013 Report Share Posted May 25, 2013 If you are building the regex programatically (load from .txt/.csv file) you need to escape the escape sign twice. Example: \n symbols new line in regex. You can copy/paste it as is in Node View, but if you are to paste in Code View, you need to have it like this: \\n Same with \s -> \\s or \. -> \\. etc... 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 25, 2013 Report Share Posted May 25, 2013 Do you have an example of a page this is on? I might be able to get something working for you. Quote Link to post Share on other sites
iDollarsteam 13 Posted May 25, 2013 Report Share Posted May 25, 2013 I don't know if I understood exactly what you wanted but I have attached my solution. Iuse the regex editor from Zennoposter and I think that it is the best for finding patterns in text.Put both files in the same folder.data.csvregex test.ubot I hope it helps... Quote Link to post Share on other sites
Pazman 32 Posted May 25, 2013 Author Report Share Posted May 25, 2013 Do you have an example of a page this is on? I might be able to get something working for you.thanks for the help on this HelloInsomnia, I don't have a page to offer because these are the body of an email I received in my Outlook program. I exported these out via a csv I don't know if I understood exactly what you wanted but I have attached my solution. Iuse the regex editor from Zennoposter and I think that it is the best for finding patterns in text.Put both files in the same folder.http://www.ubotstudio.com/forum/public/style_images/master/attachicon.gifdata.csvhttp://www.ubotstudio.com/forum/public/style_images/master/attachicon.gifregex test.ubot I hope it helps... thanks iDollarsteam, I appreciate your effort as well As you know, most data we work with does not carry the exact same patterns. There were literally 1000+ uniques for me to sift thru, which made this weird. The example I gave is one that, for whatever reason, would not work with the REGEX I used and then the 2nd difficulty was getting Ubot to recognize the pattern that were accepted by Edit Plus and regexhero. So for what its worth, for anyone running into the same thing, here is what I did to resolve this. I played around until I was able to find a small REGEX pattern that worked. I added a few more variable to the REGEX pattern and sampled those ... then rinse and repeated until I was able to rifle through a sample of 50 uniques or so and achieved about a 95% success rate. So I just broke the REGEX down a bit and build it little by little until it worked the vast majority of the time. Afterall, is that pretty much how we all build bots anyway, one spoonful at a time? Here is what works, as I said, the majority of the time: (?=\n\")([A-Za-z0-9\ \:\n\r\+\*\<\>\!\(\)\\"\@\,\.\-\/\?\=\&\{\}\|\[\]_]+)w1(?!$) Once again, thanks for the help guys. 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.