ls max
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

match-string

Synopsis

match-string "pattern" "string" [-error]

Description

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"]

Provided By

Simics Core

See Also

split-string
ls max