Improve token_and_options regex and test

add a test case to test the regex for the helper method raw_params
Merge pull request #16011 from xjlu/token_and_options

Improve token_and_options regex and test