Check whether a test keyword matches a reference keyword.
For indexed keywords, the reference keyword is expeced to end with an 'n' character, which represents any positive integer. For example:
matches("KEY", "KEY")
matches("KEY", "KEYn")
matches("KEYn", "KEYn")
matches("KEY123", "KEYn")
matches("KEYn", "KEY123")
matches("KEYWORD", "KEYn")