improve string / regexp methods