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 @[email protected] and @[email protected] and the output should be, array[0] = [email protected] array[1] = [email protected] 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. 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 @[email protected] and @[email protected] tested by @Siva kumar roll no @12345678 so the output should be array[0] = [email protected] array[1] = [email protected] array[2] = siva kumar array[3] = 12345678 And i want to split the same using javascript also... 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. Link to comment https://forums.phpfreaks.com/topic/276462-splitting-the-string/#findComment-1422590 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.