Hi
I have some code where i want to search an array for specific patterns:
Local $aTest[6] = ["0001-1.jpg", "0001-2.jpg","0001-3.jpg","0001-5.jpg", "alt 0001-11.jpg", "0001-6.jpg"]
_ArrayDisplay($aTest)
Local $aResult=_ArrayFindAll($aTest,"^[\d].*$",0,0,0,3)
_ArrayDisplay($aResult)
The results should not include the "alt 0001-11.jpg" which it does by now.
The "0001" comes from a variable $sPrefix
To make the search more failure-tolerant, i only want the results that match:
<$sPrefix: unlimited number of numberic characters from 0 to 9>-<only one numberic character from 0 to 9>.jpg
I cannot figure out how to construct the regexp, my problem is the "-" which needs to be in between the 2 numeric values as well as the ".jpg" in the end.
Additionally i don't know how to integrate the variable in the regexp.
Best,
Thomas