preg_match not defined in php4 in openwrt?
- by user2723949
I have installed the packages PHP4 and PHP4-CGI in openwrt through command line (opkg install)
when I tried this simple code by putting this in the openwrt www folder,
<?php
$subject = "abcdef";
$pattern = '/^def/';
preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3);
print_r($matches);
?>
I got this error
Fatal error: Call to undefined function: preg_match() in /www/phptest.php on line 4
but php manual says preg_match() is defined in php4 also.. What might be the reason for this error? Is there any other PHP module that is to be installed? Or is there any alternate method for preg_match?