Izebize Posted July 4, 2009 Posted July 4, 2009 Hi! I wrote a little script to demonstrate my problem: #include <Array.au3> $sString = "Blablalba" & @CRLF & _ "Something goes here: coolstuff" & @CRLF & _ "Blablabla" & @CRLF & _ "Something goes here: else" & @CRLF & _ "Blablabla" $aSRE = StringRegExp($sString, "(?:Something goes here: ([a-z]*))+", 1) _ArrayDisplay($aSRE) It creates an array ["coolstuff"]. How can I make it to recognize the other string, so the result would be ["coolstuff", "else"] ?
Malkey Posted July 4, 2009 Posted July 4, 2009 Hi! I wrote a little script to demonstrate my problem: #include <Array.au3> $sString = "Blablalba" & @CRLF & _ "Something goes here: coolstuff" & @CRLF & _ "Blablabla" & @CRLF & _ "Something goes here: else" & @CRLF & _ "Blablabla" $aSRE = StringRegExp($sString, "(?:Something goes here: ([a-z]*))+", 1) _ArrayDisplay($aSRE) It creates an array ["coolstuff"]. How can I make it to recognize the other string, so the result would be ["coolstuff", "else"] ? Try changing the flag parameter of StringRegExp to global matches, 3.
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