adding post and delete and separating regexes into separate functions