sowna Posted April 3, 2013 Share Posted April 3, 2013 Hi i am want to split the below string String: this is test for checking the tagging for @vinodkumar@yahoo.com and @kumar@gmail.com and the output should be, array[0] = vinodkumar@yahoo.com array[1] = kumar@gmail.com Quote Link to comment https://forums.phpfreaks.com/topic/276462-splitting-the-string/ Share on other sites More sharing options...
requinix Posted April 3, 2013 Share Posted April 3, 2013 Find a regular expression for emails then stick (?at the very beginning. Quote Link to comment https://forums.phpfreaks.com/topic/276462-splitting-the-string/#findComment-1422582 Share on other sites More sharing options...
sowna Posted April 3, 2013 Author Share Posted April 3, 2013 Thanks I forget to tell one thing, it not only contain email id also some name and numbers, Example: this is test for checking the tagging for @vinodkumar@yahoo.com and @kumar@gmail.com tested by @Siva kumar roll no @12345678 so the output should be array[0] = vinodkumar@yahoo.com array[1] = kumar@gmail.com array[2] = siva kumar array[3] = 12345678 And i want to split the same using javascript also... Quote Link to comment https://forums.phpfreaks.com/topic/276462-splitting-the-string/#findComment-1422584 Share on other sites More sharing options...
requinix Posted April 3, 2013 Share Posted April 3, 2013 Then find a regular expression for emails, names, and numbers, probably looking like (email|name|number), then stick (?at the very beginning. Quote Link to comment https://forums.phpfreaks.com/topic/276462-splitting-the-string/#findComment-1422590 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.