Blockland Forums > Modification Help
Where can * be used as a wildcard?
Port:
The following functions accept wildcards for at minimum one of their parameters (I'm unsure of items in italics):
discoverFile
findFirstFile
findNextFile
export
deleteVariables
--- Quote from: TheRealMint on May 07, 2012, 11:08:35 PM ---As Nexus said, the star could represent any number of characters. All of the following would fall under A*D:
AD
ABD
ABCD
--- End quote ---
That depends on the expression language. Actually I believe that the one TorqueScript is using would not classify "AD" under the expression "A*D*".
Ipquarx:
deleteVariables("$blah*");
That would delete any global variables starting with blah.
Greek2me:
--- Quote from: Ipquarx on May 09, 2012, 12:55:57 PM ---deleteVariables("$blah*");
That would delete any global variables starting with blah.
--- End quote ---
However, a variable named $blah would not be deleted..
$blah = "hi";
$blah::stuff = "hey";
$blah::test = "hello";
deleteVariables("$blah*");
$blah::stuff and $blah::test have now been deleted, but $blah still exists.
Ipquarx:
--- Quote from: Greek2me on May 09, 2012, 06:17:24 PM ---However, a variable named $blah would not be deleted..
$blah = "hi";
$blah::stuff = "hey";
$blah::test = "hello";
deleteVariables("$blah*");
$blah::stuff and $blah::test have now been deleted, but $blah still exists.
--- End quote ---
I said Starting with, not starting AND ending with.
Greek2me:
I know you know, I was just clarifying for Lugnut.