RegexScanner passes test cases
some comments