Fixed the bug that cannot extract and match correct groups.