JavaScript RegExp class.
Creates text node and append it to the element.
Removes all the children from this node.