Jump to content
UBot Underground

[SOLVED] Quantifier is interpreted as a Ubot variable


Recommended Posts

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!

Link to post
Share on other sites

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...

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...