Pc add regex tests

Add test for regexs and issue 307.