Change the regex to fix some failed tests

ref #925
I'm not sure if that modification is reasonable.
If it's reasonable, please merge this to fix some tests.