adding regex and back reference feature