You messed up the regular expression I gave you. The parenthesis need to go
in the first paramater, not the second. Otherwise it will replace an string
instead of a single character.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

----- Original Message -----
From: ReDucTor <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 1:28 PM
Subject: Re: [PHP] simple question


this is wierd, i have the following...

$buffer = eregi_replace("[^A-Z0-9]", "(\\x".dechex(ord("\\1")).")" ,
$buffer);

and this is what buffer is

˙˙˙˙m192.168.0.2:27015Counter-Strike 1.1
Serverde_dust2cstrikeCounterStrike+dwwww.nuclearbox.com/podbot

but this is what comes out

(\x5c)(\x5c)(\x5c)(\x5c)m192(\x5c)168(\x5c)0(\x5c)2(\x5c)27015

and \x5c is \

ne1 know why?
----- Original Message -----
From: Chris Lambert <[EMAIL PROTECTED]>
To: ReDucTor <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 2:47 AM
Subject: Re: [PHP] simple question


> Lowercase letters are included (eregI_replace) but you could add number
> support with:
> [^A-Z0-9]
>  ______________________________
> / Chris Lambert - [EMAIL PROTECTED]
> |-> ICQ #: 16435685 - AIM: ClipperChris
> `-> Cell: (401) 743-2786 - http://sms.clambert.org/
> ----- Original Message -----
> From: ReDucTor <[EMAIL PROTECTED]>
> To: Chris Lambert - WhiteCrown Networks <[EMAIL PROTECTED]>
> Sent: Sunday, July 08, 2001 11:45 AM
> Subject: Re: [PHP] simple question
>
>
> | nice, but i might change it to have lower case and numbers...hehehe
> |
> | btw thx
> | ----- Original Message -----
> | From: Chris Lambert - WhiteCrown Networks <[EMAIL PROTECTED]>
> | To: <[EMAIL PROTECTED]>
> | Sent: Monday, July 09, 2001 12:50 AM
> | Subject: Re: [PHP] simple question
> |
> |
> | > eval("\$string=\"".eregi_replace("([^A-Z])",
> | > "\\x\".dechex(ord(\"\\1\")).\"", $string)."\";");
> | >
> | > ;-)
> | >
> | > /* Chris Lambert, CTO - [EMAIL PROTECTED]
> | > WhiteCrown Networks - More Than White Hats
> | > Web Application Security - www.whitecrown.net
> | > */
> | >
> | > ----- Original Message -----
> | > From: ReDucTor <[EMAIL PROTECTED]>
> | > To: <[EMAIL PROTECTED]>
> | > Sent: Sunday, July 08, 2001 10:18 AM
> | > Subject: [PHP] simple question
> | >
> | >
> | > is there a function to turn all chars that are not alphanumric to show
> | \xhh
> | > but hh being the hex version of it :)?
> | >
> | >
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED]
> | > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> | >
> |
> |
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to