robert_gsfame Posted July 16, 2010 Share Posted July 16, 2010 How can i check whether a string contain any numbers or not....using REGEXP thx Link to comment https://forums.phpfreaks.com/topic/207918-check-whether-string-contain-numbers/ Share on other sites More sharing options...
Adam Posted July 16, 2010 Share Posted July 16, 2010 if (str.match(/[0-9]/)) { // contains a number } Link to comment https://forums.phpfreaks.com/topic/207918-check-whether-string-contain-numbers/#findComment-1086927 Share on other sites More sharing options...
robert_gsfame Posted July 16, 2010 Author Share Posted July 16, 2010 thx mrAdam...i always get the difficulty when it comes to RegExp.... :P so confusing Link to comment https://forums.phpfreaks.com/topic/207918-check-whether-string-contain-numbers/#findComment-1086950 Share on other sites More sharing options...
Adam Posted July 16, 2010 Share Posted July 16, 2010 Ha, many people think the same. Just takes a bit of time.. Link to comment https://forums.phpfreaks.com/topic/207918-check-whether-string-contain-numbers/#findComment-1086952 Share on other sites More sharing options...
robert_gsfame Posted July 16, 2010 Author Share Posted July 16, 2010 haha...thx a lot!!! Link to comment https://forums.phpfreaks.com/topic/207918-check-whether-string-contain-numbers/#findComment-1086954 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.