Say I have 1000 variables $var1, $var2, ...... $var1000 (with arbitrary values
Code: Select all
if ($varNew != $var1) && ..... &&($varNew != $var1000){
//do something if no match found
}Code: Select all
if ($varNew != $var1) && ..... &&($varNew != $var1000){
//do something if no match found
}...instead of regexmatches: could also be simply gettokenindex($varNew, $string, ...)nerdweed wrote:What are you planning to do with 1000 variables.![]()
I trust you would be reading that from a file. If so you can read it in a single variable and then do a regexmatches on it.
You can than split that single variable across 1000 variables if need be.
Aha, thanks! I'll just do $string = $var1.$var2. ... .$var1000 and do ^that!PeterH wrote:gettokenindex($varNew, $string, ...)