Re: simple question

From: Date: Sun, 08 Jul 2001 17:38:57 +0000
Subject: Re: simple question
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-56782@lists.php.net to get a copy of this message
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 - chris@whitecrown.net WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ ----- Original Message ----- From: ReDucTor <sjdtmv@tpg.com.au> To: <php-general@lists.php.net> 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 <clambert@gamespy.com> To: ReDucTor <sjdtmv@tpg.com.au> Cc: <php-general@lists.php.net> 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 - cjlambert@home.com > |-> ICQ #: 16435685 - AIM: ClipperChris > `-> Cell: (401) 743-2786 - http://sms.clambert.org/ > ----- Original Message ----- > From: ReDucTor <sjdtmv@tpg.com.au> > To: Chris Lambert - WhiteCrown Networks <chris@whitecrown.net> > 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 <chris@whitecrown.net> > | To: <php-general@lists.php.net> > | 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 - chris@whitecrown.net > | > WhiteCrown Networks - More Than White Hats > | > Web Application Security - www.whitecrown.net > | > */ > | > > | > ----- Original Message ----- > | > From: ReDucTor <sjdtmv@tpg.com.au> > | > To: <php-general@lists.php.net> > | > 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: php-general-unsubscribe@lists.php.net > | > For additional commands, e-mail: php-general-help@lists.php.net > | > To contact the list administrators, e-mail: php-list-admin@lists.php.net > | > > | > | > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#56782) next »