PHP Intercept Mailbox URL method ... Solving!
Title: Want to intercept the mailbox @ to. com between the data, I am a novice to help!
Example: [email protected] after interception becomes 163.
------Solution--------------------
Preg_match ('/@ (\w+) \.com/', $s, $m);
echo $m [1];
------Solution--------------------
substr ($mail, Strpos (' @ ') +1,strrpos ('. '));
------Solution--------------------
Strpos See the parameters of this method
------Solution--------------------
$AA = substr ($mail, Strpos ($mail, ' @ ') +1,strrpos ($mail, '. '));
Is #1 a bad thing?
------Solution--------------------
Explore
$AA = substr ($mail, Strpos ($mail, ' @ ') +1,strrpos ($mail, '. '));
Is #1 a bad thing?
------Solution--------------------
C + + code
[User:root time:08:51:06 path:/home/liangdong/php]$ php preg.php 163[user:root time:08:51:07 Path:/home/liangdong/php ]$ Cat preg.php