CMD is not a language, you may be referring to Batch.
You would have to call it Regex and provide functions for matching the Regex string.
local Regex singleWordFilter = Regex.create("[a-zA-Z]+")
local boolean isWord
set isWord = singleWordFilter.match("hello") // Returns true
set isWord = singleWordFilter.match("hi") // Returns true
set isWord = singleWordFilter.match("lol okay") // Returns false
These are the specifications for Regex in its entirety.
And this is the API I expect out of you:
struct RegexSearchResult
method operator valid takes nothing returns boolean
// Returns whether the operation succeeded
method getString takes nothing returns string
// Returns the found sub-sequence
struct Regex extends array
static method create takes string expression returns Regex
// Creates a Regular Expression using the argument string
method match takes string target returns boolean
// Determines whether the target string matches the Regex
method search takes string target returns RegexSearchResult
// Determines whether a sequence of the target string matches the Regex
// Op-limit Unsafe unless you come up with a nice algorithm.
// You'd have to look into certain implementations of this to see how you can
// pull it off efficiently
method replace takes string target, Regex newFormat returns string
// You don't need to implement this.
// Some documentation on it can be found here:
// cplusplus.com/reference/regex/match_replace/
Also, please, enough of all this shit you're creating like StackTable and TableStack, and QueueStack, and StackQueue and StackTableQueue and QueueTableStack and AGRGAGRAGGRAGGRAGRA
Regex is useful for advanced player commands with a very small amount of code.
It's useful for passing arguments to commands that must follow very specific conditions.
If you do this right, you will have my respect.
Make me proud son.