regex not saved properly