Yahoo Interview Question

Regex Question Build a function that takes one string and one regex expression in inputs and output true if the string matches the regex expression. string: a-z regex: a-z + * (where '*' matches 0 or more character and '+' matches one character)