Jump to content

Case sensitive search with _StringBetween


 Share

Recommended Posts

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

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...