Jump to content
Sign in to follow this  
inwmsn

Case sensitive search with _StringBetween

Recommended Posts

inwmsn

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)

Share this post


Link to post
Share on other sites
inwmsn

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)

Share this post


Link to post
Share on other sites
inwmsn

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. ^^

Share this post


Link to post
Share on other sites
inwmsn

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)

Share this post


Link to post
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
Sign in to follow this  

×