pw regex fix