Aceguy Posted May 9, 2009 Share Posted May 9, 2009 (edited) one|two|three|four|five|six|seven|testx testy | mary had a little lamb| my string have tried (?<=\|)\w* please help Edited May 9, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Developers Jos Posted May 9, 2009 Developers Share Posted May 9, 2009 #include<array.au3> $split = StringSplit("|one|two|three|four|five|six|seven|testx testy | mary had a little lamb","|") _ArrayDisplay($split) $split = StringRegExp("|one|two|three|four|five|six|seven|testx testy | mary had a little lamb","(.*?)\|",3) _ArrayDisplay($split) 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 More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 thanks Jos, your the Greatest [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 but the regexp does not capture last string, any ideas.? [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
GEOSoft Posted May 9, 2009 Share Posted May 9, 2009 "(.*?)\|?" 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 More sharing options...
Developers Jos Posted May 9, 2009 Developers Share Posted May 9, 2009 (edited) but the regexp does not capture last string, any ideas.?Which last string?Oh.. i seeCould do this:$split2 = StringRegExp("|one|two|three|four|five|six|seven|testx testy | mary had a little lamb" & "|","(.*?)\|",3) Edited May 9, 2009 by 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 More sharing options...
GEOSoft Posted May 9, 2009 Share Posted May 9, 2009 Which last string?The way you had it "mary had a little lamb" would have been missed. You forgot the "?" after "|". I do it all the time too. 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 More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 thanks guys, your the best [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Developers Jos Posted May 9, 2009 Developers Share Posted May 9, 2009 The way you had it "mary had a little lamb" would have been missed. You forgot the "?" after "|". I do it all the time too.I saw that after I posted that and corrected it, but does your solution work in the example I posted ?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 More sharing options...
GEOSoft Posted May 9, 2009 Share Posted May 9, 2009 Now that I have my eyes open... No. 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 More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 (edited) i didn't understand why if you was picking up this question from my post this morning my post what was wrong with the $A_SRE=StringRegExp ($string,"\|?(.*?)\|" ,3) that was used in that post? Edited May 9, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 (edited) tried a search for my question and came up with your post, coulndt figure it out with expresso,\|?(.*?)\| does not work in it. Edited May 9, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 (edited) but yea i know how you feel trying to learn StringRegExp (), iv been looking at it for the last 2 days & pcre pattern matching is a right pain to learn (well is for me ) although i think iv got enough of a handle on it now to put it into use.i found these helped a lot :-regulazyand this little appg luck with it p.s. ($string,"\|?(.*?)\|" ,3) worked fine with the test i did with that exact string Edited May 9, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 (edited) it worked, but didnt want it returing the | in expresso Edited May 9, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 "scratch head" shouldn't return any "|"'sso what expression did you use that worked for you? Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 it works fine in autoit, but in expresso, i have been scratching my head for ages.... and as you can see, it returns the | at the end and doesnt return the last string ( i know i could put a | at the end) but wanted it to work like a proper Stringsplt [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 hmm interesting , where did you get that program pls ? odd why its returning the "|" but AutoIt dont and Regulazy dont either, maybe you have the flag not set to 3 "global matches" not sure but id like to have a look at that prog though as im learning SRE also. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Aceguy Posted May 9, 2009 Author Share Posted May 9, 2009 program is called Expresso, just google it [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 well weird, mine does return the last string but does also return the "|"'s to which it shouldn't. must be something not set right here somewhere, cant really use the program if it dont return proper results but probably just missing something. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
JackDinn Posted May 9, 2009 Share Posted May 9, 2009 iv noticed that if you open the tree for each result it dont have the following "|" it seems to always put the ending exp character in the results for some reason? Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now