match-string "pattern" "string" [-error]
Match pattern with string returning TRUE if the pattern matches and FALSE if not. The command will signal an error if the -error flag is used and the string does not match the pattern. The format of pattern is the same as used by the Python re.search() method. If the pattern contains groups, the return value on a match is a list of matching strings. Example:
match-string "abd" "abcdef" → FALSE
match-string "abc" "abcdef" → TRUE
match-string "(a*)([0-9]*)x" "aaa04x") → ["aaa", "04"]
Simics Core
split-string