Jump to content

help me on string


toxicvn
 Share

Recommended Posts

hey !!!!!!!!!!!!!!!!

i have text e.g:

?order=1&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=2&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=3&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=4&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=5&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=0&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=6&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944514');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944602');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931489');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944774');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944837');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944914');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931882');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18945048');

i want only get all string look like including "java script:showinfo"

help me

thank very much

Link to comment
Share on other sites

#include <array.au3>;; Only for _ArrayDisplay()
$sFile = FileRead("myFile.txt");;  Replace this with the actual path and filename or some other string souce
$aStr = StringRegExp($sFile, "(?i)java\sscript:showinfo.+;", 3);; Returns a 0 based array
_ArrayDisplay($aStr)

EDIT: Not tested. Written on the fly

Edit2:

If the file looks Exactly the way you showed it then you could also use

$sFile = FileRead("myFile.txt");;  Replace this with the actual path and filename or some other string souce
$sFile = StringMid($sFile,StringInStr($sFile,"java script:"))

Also not tested

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

it not working !!!!!!!!

please, help me i am newbie

thank

:):o:D :D :D

Working fine as posted... so you better start showing more info about what you have done.

Jos :(

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Apparently Jos has tested this so we know the code itself works. What is your data source for the text you posted? Is it in a file or are you using something like _InetGetSource() or some other method?

Without more info this is like saying "I have a rattle in my car, what is causing it?". You have put us at a disadvantage right off the start without more info.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

hey !!!!!!!!!!!!!!!!

i have text e.g:

?order=1&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=2&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=3&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=4&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=5&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=0&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=6&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944514');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944602');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931489');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944774');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944837');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944914');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931882');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18945048');

i want only get all string look like including "java script:showinfo"

e.g:

i used _InetGetSource() to Get Source of the web . I getted links same in this texts

and i want only get all string same "/cgi-bin/online.cgi?action=showwin&pid=18945048" in this

texts

Link to comment
Share on other sites

hey !!!!!!!!!!!!!!!!

i have text e.g:

?order=1&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=2&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=3&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=4&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=5&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=0&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

?order=6&page=1&country=&city=&s_city=&s_country=&s_state=&s_host=&s_ip=68.*.*.*&search=1

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944514');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944602');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931489');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944774');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944837');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18944914');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18931882');

java script:showinfo('/cgi-bin/online.cgi?action=showwin&pid=18945048');

i want only get all string look like including "java script:showinfo"

e.g:

i used _InetGetSource() to Get Source of the web . I getted links same in this texts

and i want only get all string same "/cgi-bin/online.cgi?action=showwin&pid=18945048" in this

texts

So you only want the '/cgi-bin/online.cgi?action=showwin&pid=18944514' part? And you have already extracted the links from the source?

#include <array.au3>;; Only for _ArrayDisplay()
$sFile = FileRead("myFile.txt");;  Replace this with the actual path and filename or some other string souce
$aStr = StringRegExp($sFile, "(?i)java\sscript:showinfo\((.+)\);", 3);; Returns a 0 based array
_ArrayDisplay($aStr)

If you don't want the quotes then

#include <array.au3>;; Only for _ArrayDisplay()
$sFile = FileRead("myFile.txt");;  Replace this with the actual path and filename or some other string souce
$aStr = StringRegExp($sFile, "(?i)java\sscript:showinfo\('(.+)'\);", 3);; Returns a 0 based array
_ArrayDisplay($aStr)

If you don't have the links extracted yet then I can change the code to get them.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

it working very good

:):o:D :D :D

thank very much

:(;)^_^:huh:

do you give some examples for me and some newbie same me ?

I've just given you three different methods (examples). Which one is working for you?

Edit: I get the feeling that for some reson you are already parsing too much from _InetGetSource(). This could probably be done in a single step (no intermediate file required) if I had a page link to check it against.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...