Re: script question
| From: | Joe Stump | Date: | Tue, 17 Oct 2000 03:59:34 +0000 |
| Subject: | Re: script question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20512@lists.php.net to get a copy of this message | ||
Sure this is easy
$foo = explode('@',$email);
$username = $foo[0];
$domain = $foo[1];
--Joe
On Tue, Oct 17, 2000 at 12:57:54PM +0900, Maxim Maletsky wrote:
> here's a good base to learn Reg Ex ..
>
> http://www.phpbuilder.com/columns/dario19990616.php3
>
> -----Original Message-----
> From: BrianSander [mailto:yoda@ipo.asu.edu]
> Sent: Saturday, September 23, 2000 6:52 AM
> To: php-general@lists.php.net
> Subject: [PHP] script question
>
>
> Greetings,
>
> I have a problem which will probably has a very simple solution, I'm
> relatively new to programming in general.
>
> I'm attempting to write a php script which will split an email address
> into its name and domain components.
>
> $email is passed from a webpage
>
> <?php
>
> $before_@ = (some regular expression)$email
> $after_@ = (some regular expression)$email
>
> ?>
>
>
> How would this be accomplished?
>
> Thanks.
>
> --
> 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
/*****************************\
* Joe Stump *
* www.Care2.com *
* Office: 650.328.0198 *
* Extension: 122 *
\*****************************/
http://www.miester.org/Joe/Stump/Joe_Stump_resume.html
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------