Checks if a string matches a given regular expression pattern.
match(text, pattern)
Check if “abc123” contains digits
match("abc123", "[0-9]+"); // returns 1
Check if “hello” starts with “h”
match("hello", "^h"); // returns 1
Check if “test” contains only numbers
match("test", "^[0-9]+$"); // returns 0
Check if “abc” contains lowercase letters
match("abc", "[a-z]+"); // returns 1
Check if “ABC” contains only uppercase letters
match("ABC", "^[A-Z]+$"); // returns 1
Check if the string “PlanetCNC” contains the substring “CNC”.
match("PlanetCNC", "CNC"); // returns 1
Check if the string starts with 'P' and ends with 'C'
match("PlanetCNC", "^P(.*)C$"); // returns 1