Re[2]: [PHP] Perl Question
| From: | Mirza Muharemagic | Date: | Fri, 28 Jun 2002 17:18:30 +0000 |
| Subject: | Re[2]: [PHP] Perl Question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104372@lists.php.net to get a copy of this message | ||
use backslsh before . ---->> \.
$domain = s/\./-/gi;
Andrew, he wanted perl help, not php :)
Mirza mirza@php.co.ba
28.06.2002 19:10
> There are many easy ways to do this, I would do the following:
> $newDomain = str_replace('.','-',$domain);
> easy :)
> Andrew
> ----- Original Message -----
> From: "Kurth Bemis (List Monkey)" <listmonkey@usaexpress.net>
> To: <php-general@lists.php.net>
> Sent: Friday, June 28, 2002 6:12 PM
> Subject: [PHP] Perl Question
>> I know that this a PHP list. I need some perl help.
>>
>> i need to take all the "." in a web address and make them into "-".
>>
>> example
>>
>> subdomain.domain.com --> subdomain-domain-com
>>
>> get it?
>>
>> heres my s/ code....but it doesn't work :-(
>>
>> $domain = s/./-/gi;
>>
>> ~kurth
>>
>> Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer
>>
>> "Jedi business, Go back to your drinks" - Anakin Skywalker, AOTC
>>
>> kurth@usaexpress.net | http://kurth.hardcrypto.com
>> PGP key available - http://kurth.hardcrypto.com/pgp
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>