golfinhu Posted January 13, 2012 Posted January 13, 2012 (edited) Hi, i need a little help: I have this string: ##### Strings (here) ##### string 1 string 2 string 3 string 4 ##### Strings (not here) ##### string 5 string 6 string 7 string 8 i trying to capture the text above "##### Strings (here) #####" until blank line i tried this: StringRegExp($Value, "(?i)(?m)##### Strings (here) #####v+[whv]*", 3) but the return is: [0] = ##### Strings (here) ##### string 1 string 2 string 3 string 4 but wath i need is this: [0] = string 1 [1] = string 2 [2] = string 3 [3] = string 4 anyone help me? thanks a lot Edited January 13, 2012 by golfinhu
funkey Posted January 13, 2012 Posted January 13, 2012 Did you try _StringBetween()? Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
golfinhu Posted January 13, 2012 Author Posted January 13, 2012 _StringBetween() is not functional for what i want
funkey Posted January 13, 2012 Posted January 13, 2012 Why not? #include <String.au3> #include <Array.au3> Local $sTest = "##### Strings (here) #####" & @CRLF & _ "string 1" & @CRLF & _ "string 2" & @CRLF & _ "string 3" & @CRLF & _ "string 4" & @CRLF & _ "" & @CRLF & _ "##### Strings (not here) #####" & @CRLF & _ "string 5" & @CRLF & _ "string 6" & @CRLF & _ "string 7" & @CRLF & _ "string 8" & @CRLF Local $sNew = _StringBetween($sTest, "##### Strings (here) #####" & @CRLF, @CRLF & @CRLF) Local $aNew = StringSplit($sNew[0], @CRLF, 3) _ArrayDisplay($aNew) golfinhu 1 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
golfinhu Posted January 13, 2012 Author Posted January 13, 2012 Yeah! ;D, really works ;p i was not doing it right! x.x thanks a lot for the help!
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