Update regex of createDocumentFragment