edit offset regex pattern