Created
February 8, 2012 22:10
-
-
Save chartjes/1774431 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I need help extracting some info using a regex in PHP. | |
I have a string is like this | |
[email protected] | |
-> foo can change but is always lowercase alpha, variable length | |
-> tmp is ALWAYS tmp | |
-> uniqid is always lowercase alpha plus 0 to 9, output from uniqid() function | |
-> moontoast.com is ALWAYS moontoast.com | |
I need to extract the uniqid value from that string, using PHP. | |
Please help as my regex foo is weak | |
[email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A humble vote for the solution proposed by @shama. Seems like foo, tmp, and anything after the @ are irrelevant.