I am checking browser agent and version using preg match. but i found error while i update my php version 5.3 to 5.4
preg_match( '/Mozilla/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version)
have any idea how to fix this issue?
I am checking browser agent and version using preg match. but i found error while i update my php version 5.3 to 5.4
preg_match( '/Mozilla/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version)
have any idea how to fix this issue?
Apply \ (backslash) before second /(forwardslash) to escape it
preg_match( '/Mozilla\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version);
preg_match('/Netscape([0-9])\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version1);
Note:- Any / in between starting and ending /(delementer) in preg_match() need to be escaped to make it run fine.