Add regex support to replace

regex: as well as firstregex:
Also, document other regex options