-----Original Message-----
From: Bala, Kishore [mailto:bala@s...]
Sent: 02 June 2000 07:00
To: 'harawat@n...'
Cc: 'support@w...'
Subject: Problem with Regexs in PHP 3.0.14
Hi,
Could you please help me solve the following problem :
One of my programs changes all non-alphanumeric chars into
'\x[0-9A-F][0-9A-F]'. Basically into two digit hex-encoded chars.
In order to use the rawurldecode function in my PHP to get back my actual
non-alphanumeric chars, I need to change '\x' in above into '%'.
Could you please suggest a way to do this.
The following reg-ex doesn't seem to work :
$str = "myjuno\x29"; // actual string being "myjuno)"
$str = preg_replace ("/\\x([0-9A-F])([0-9A-F])/", "%\\1\\2", $str);
For some reason above func is not working. The PHP version I am using is
3.0.14
Thankyou in advance,
bala