Add pattern to textarea (not supported directly, but convenient for scripting).