RE: [PHP] \ Char Problems
| From: | Matt Stone | Date: | Wed, 13 Dec 2000 07:00:41 +0000 |
| Subject: | RE: [PHP] \ Char Problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30049@lists.php.net to get a copy of this message | ||
Like so?
'/\\/\\' => 'm'
it just returns "/\\/\\"
-----Original Message-----
From: jeremy brand [mailto:jeremy@nirvani.net]
Sent: Wednesday, 13 December 2000 4:58 PM
To: Matt Stone
Cc: PHP List
Subject: Re: [PHP] \ Char Problems
Try using single quotes instead (').
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At least for the people who send me mail about a new language that
they're designing, the general advice is: do it to learn about
how to write a compiler. --Dennis Ritchie
On Wed, 13 Dec 2000, Matt Stone wrote:
> Date: Wed, 13 Dec 2000 16:55:32 +1000
> From: Matt Stone <matt@planetveggie.com>
> To: PHP List <php-general@lists.php.net>
> Subject: [PHP] \ Char Problems
>
> Hi,
> I have a code that converts certain chars (l33t chars) into normal text.
> What I am trying to do is convert all instances of "/\/\" in a string to
> "M".
> I have some code that stores all the leet/normal text conversions like so:
> "M" => "/\/\", "N" => "|\|"
> The problems is that if I have it like this then I get a parse error
because
> of the \ chars. If I change the code like this:
> "M" => "/\\/\\", "N" => "|\\|"
> Then the conversion is not made because it will not find "/\\/\\" in the
> string, only "/\/\". Any ideas? Thanks,
>
> Matt Stone
>
> _______________________________
>
> This email may contain confidential and/or privileged information for the
> sole use of the intended recipient. Any review or distribution by others
is
> strictly prohibited. If you have received this email in error, please
> contact the sender and delete all copies. Opinions, conclusions or other
> information expressed or contained in this email are not given or endorsed
> by the sender unless otherwise affirmed independently by the sender.
>
> _________________________________
>
>
> --
> 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
>
>