add new spec
fix many regexp bugs