how do i write this in regular expression?
<input (anything not equal to type=('|")?text\1) type=('|")?text\1 ([>]*>
i want to get the text after the string "<input " only if it is does not contain the string "type="text"".
i tried this
$arrMatch = array("/<input (?!type=('|\")?text\1) type=('|\")?text\1 ([>]*)>/i");
$arrReplace = array("<input \1 type=\"text\" \4>");
$strContents = preg_replace ($arrMatch, $arrReplace, "<input name=\"somename\" type=\"checkbox\" value=\"somevalue\">.");
but it wont work...