First, stick the accepted commands into an array:
foreach command $accepted_command_list {
set acceptedCommands($command) 1
}
foreach {match command} [regexp -all -inline {[(w*)[^]]*]} $mystring] {
if {![info exists acceptedCommands($command)]} {
error "$command is not an accepted command"
}
}