Jump to content
UBot Underground

Help Only Need One Instant Of Regex Value


Recommended Posts

im trying to get this value AQEleUVnsmgo

 

name="sebg" value="AQEleUVnsmgo" autocomplete="off">

 

i have no problem getting the regex value but there is 3 instances on the page and i just want one

 

here is what i have

 

(?<=sebg\"\ value\=\").+?(?=\"\ autocomplete\=)

 

and it outputs this

 

AQEleUVnsmgo

AQEleUVnsmgo

AQEleUVnsmgo

 

 

and the out put i want is

 

AQEleUVnsmgo

 

 

Link to post
Share on other sites

when i try to add it to list it adds all as one line

 

That is really weird, can you post the full page you're trying to work with as your regex looks alright and what pftg4 said should work fine for this.

Link to post
Share on other sites

the reason it outputs 3 is because that string is on the page 3 times

 

Right but that regex should add it to the list 3 times and then if it removes duplicates you will have your output in the list item 0,

 

check this out:

set(#var, "name=\"sebg\" value=\"AQEleUVnsmgo\" autocomplete=\"off\">
name=\"sebg\" value=\"AQEleUVnsmgo\" autocomplete=\"off\">
name=\"sebg\" value=\"AQEleUVnsmgo\" autocomplete=\"off\">", "Global")
clear list(%regex)
add list to list(%regex, $find regular expression(#var, "(?<=sebg\\\"\\ value\\=\\\").+?(?=\\\"\\ autocomplete\\=)"), "Delete", "Global")

Maybe that can give you some insight. But otherwise if you post the string you're trying to find the regex in I can show you directly with that as well.

Link to post
Share on other sites

http://facebook.com

 

 

 

        add item to list(%testlist,$find regular expression(#FriendsPage_one,"(?<=name\\=\\\"fb_dtsg\\\"\\ value\\=\\\").+?(?=\\\"\\ autocomplete\\=)"),"Delete","Global")

 

 

AQHIwAIKqnSK
AQHIwAIKqnSK
AQHIwAIKqnSK

 

 

thats what gets put in my list as line zero

Link to post
Share on other sites

The reason being: you're adding an item to a list. In this case you want to use add list to list, try this:

clear list(%testlist)
add list to list(%testlist, $find regular expression(#FriendsPage_one, "(?<=name\\=\\\"fb_dtsg\\\"\\ value\\=\\\").+?(?=\\\"\\ autocomplete\\=)"), "Delete", "Global")
  • 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...