A Toy Regex Implementation In Scala