fox_statton
asked on
Simple regex not working
$html = "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\">";
$html = preg_replace('/form/si', 'f1', $html);
Anyone have any idea why this isnt working?
$html = preg_replace('/form/si', 'f1', $html);
Anyone have any idea why this isnt working?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What result are you getting and what were you expecting?
$html = "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\">";
$html = preg_replace('/form(\d+)/s