Hi Guys,
I'm writing some php code which parses an html file and formats it. I'm having a few problems using the ereg_replace command to strip out some html code. My code is as follows:
<?
$final = ereg_replace("<INPUT TYPE=\"checkbox\" NAME=\"action_chk_lst[[0-9]]\"", " ", $strip2);
?>
$strip2 is the html file contents. The file contains several instances of the above string and action_chk_lst shows up as action_chk_lst[1], action_chk_lst[2], action_chk_lst[3] and so on. My regular expression doesn't seem to match as the html code isnt removed once it's run. Using str_replace and referencing one of the action_chk_lst's specifically works fine (the code is removed and replaced with a space)
Any ideas as to why it's not working, and/or is there a better way to do it?
Thanks a lot,
Stew