optional ending regex delimiter