Zend_Validator_Regex throws error: Internal error while using the pattern <blockquote> <p>Message: Internal error while using the pattern "(http://)?(www.)?(youtu)((be.com)|(.be))/.*"</p> </blockquote> <pre><code>$element = new Zend_Form_Element_Text($this-&gt;name); $element-&gt;setRequired(true) -&gt;setLabel(FileTypes::$names[$this-&gt;fileType]) -&gt;setDescription('Paste YouTube link here') -&gt;setDecorators(FormDecorators::$simpleElementDecorators) -&gt;addValidator('regex', false, '(http://)?(www\.)?(youtu)((be\.com)|(\.be))/.*'); </code></pre> <p>Throws error even with simple regular expression. </p>