pattern text edit