Anonym 53 Posted April 6, 2013 Report Share Posted April 6, 2013 Any ideas on how to handle { and } (quantifies) in Ubot without risking them to be interpreted as Ubot variables? I am having this regexp: (?<=<tr\sstyle="background-color\:\#[A-F0-9]{3}">\r\n.*<td>).*(?=</td>\r\n.*<td\sstyle="width\:.*\r\n.*<input\stype="text"\sname="[a-zA-Z0-9-_]{32}"\svalue="".*>) ...but the problem is that when it is entered into "$find regular expression", UBot strips it down to: (?<=<tr\sstyle="background-color\:\#[A-F0-9]3">\r\n.*<td>).*(?=</td>\r\n.*<td\sstyle="width\:.*\r\n.*<input\stype="text"\sname="[a-zA-Z0-9-_]32"\svalue="".*>) Did you see that? (?<=<tr\sstyle="background-color\:\#[A-F0-9]3">\r\n.*<td>).*(?=</td>\r\n.*<td\sstyle="width\:.*\r\n.*<input\stype="text"\sname="[a-zA-Z0-9-_]32"\svalue="".*>) Any ideas on how to handle this? (and without replacing the quantifier with a plus or something similar, that is, I must be able to specifiy the length of the first to three and the second to 32). I interpret it as Ubot knows that variables can't be numbers, therefor it assumes that {3} resp {32} are no variables and just rip off the {} from these. No matter what happens it just stops me from what I need to do right now. Thanks! Quote Link to post Share on other sites
ds062692 19 Posted April 6, 2013 Report Share Posted April 6, 2013 This problem is quite annoying sometimes. Have you tried the same number in a range {3,3} or {32,32}? 1 Quote Link to post Share on other sites
Anonym 53 Posted April 6, 2013 Author Report Share Posted April 6, 2013 Just did after your hint, but I am afraid no, it did not work. Have you got that to work for you? Quote Link to post Share on other sites
ds062692 19 Posted April 6, 2013 Report Share Posted April 6, 2013 It works for me, I have tried it both in ubot and expresso and it seems to work fine. Have you tried it on a simple expression to test out? Quote Link to post Share on other sites
Anonym 53 Posted April 6, 2013 Author Report Share Posted April 6, 2013 Ok, great! Then I will put some effort into finding why it didn't work for me. Thanks for the hint! Quote Link to post Share on other sites
VaultBoss 310 Posted April 6, 2013 Report Share Posted April 6, 2013 You need to escape the curly brackets in CODE VIEW, BUT only ONCE, as opposed to twice for the real escaping required by regex itself on some characters... 1 Quote Link to post Share on other sites
Anonym 53 Posted April 6, 2013 Author Report Share Posted April 6, 2013 Thanks! 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.