inwmsn Posted January 8, 2009 Share Posted January 8, 2009 Hi there, How could I exact the element from array only "9_1.php" and "9_2.php" as the sample following. The result would take all elements that end with "9" . I try to put the optional for case sensitive but still doesn't work Thanks. ------------------------------------------------------------------------------------------- #include <string.au3> $aArray = _StringBetween ('[1009_1.php] [9_1.php] [229_1.php] [9_2.php] [13099_1.php]', "9_", ".php") _ArrayDisplay ($aArray) ------------------------------------------------------------------------------------------- #include <string.au3> $aArray = _StringBetween ('[1009_1.php] [9_1.php] [229_1.php] [9_2.php] [13099_1.php]', "9_", ".php", 1) _ArrayDisplay ($aArray) Link to comment Share on other sites More sharing options...
Valuater Posted January 8, 2009 Share Posted January 8, 2009 Maybe... #include <string.au3> #include <array.au3> $aArray = _StringBetween('[1009_1.php] [9_1.php] [229_1.php] [9_2.php] [13099_1.php]', "[9_", ".php") _ArrayDisplay($aArray) For $x = 0 To UBound($aArray) - 1 $aArray[$x] = "9_" & $aArray[$x] & ".php" Next _ArrayDisplay($aArray) 8) Link to comment Share on other sites More sharing options...
inwmsn Posted January 8, 2009 Author Share Posted January 8, 2009 Thank you very much Valauter ! for the quick respond my problem has been solved. ^^ Maybe... #include <string.au3> #include <array.au3> $aArray = _StringBetween('[1009_1.php] [9_1.php] [229_1.php] [9_2.php] [13099_1.php]', "[9_", ".php") _ArrayDisplay($aArray) For $x = 0 To UBound($aArray) - 1 $aArray[$x] = "9_" & $aArray[$x] & ".php" Next _ArrayDisplay($aArray) 8) Link to comment Share on other sites More sharing options...
inwmsn Posted January 8, 2009 Author Share Posted January 8, 2009 Well! I got the same problem came up when without "[ ]" like this #include <string.au3> #include <array.au3> $aArray = _StringBetween('1009_1.php 9_1.php 229_1.php 9_2.php 13099_1.php', "9_", ".php") _ArrayDisplay($aArray) For $x = 0 To UBound($aArray) - 1 $aArray[$x] = "9_" & $aArray[$x] & ".php" Next _ArrayDisplay($aArray) Thank you very much Valauter ! for the quick respond my problem has been solved. ^^ Link to comment Share on other sites More sharing options...
inwmsn Posted January 8, 2009 Author Share Posted January 8, 2009 I think I got it! would should be like this $aArray = _StringBetween('1009_1.php 9_1.php 229_1.php 9_2.php 13099_1.php', "9_", ".php") _ArrayDisplay($aArray) For $x = 0 To UBound($aArray) - 1 $aArray[$x] = " 9_" & $aArray[$x] & ".php" Next _ArrayDisplay($aArray) Well! I got the same problem came up when without "[ ]" like this #include <string.au3> #include <array.au3> $aArray = _StringBetween('1009_1.php 9_1.php 229_1.php 9_2.php 13099_1.php', "9_", ".php") _ArrayDisplay($aArray) For $x = 0 To UBound($aArray) - 1 $aArray[$x] = "9_" & $aArray[$x] & ".php" Next _ArrayDisplay($aArray) 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