Yesideez Posted July 6, 2008 Share Posted July 6, 2008 Hi, new to regex, don't really like them as they're a pain but this is giving me a headache: /Id: ([0-9]+) - (.*) is remote ip: ([0-9\.]+)[0-9]+)/ The first ([0-9]+) refuses to match single digits - any idea what could be wrong? Quote Link to comment https://forums.phpfreaks.com/topic/113491-solved-problems-with-matching-single-number/ Share on other sites More sharing options...
Yesideez Posted July 6, 2008 Author Share Posted July 6, 2008 Sorted! The single digit was padded wth a leading space! /Id: ?([0-9]+) - (.*) is remote ip: ([0-9\.]+)[0-9]+)/ Quote Link to comment https://forums.phpfreaks.com/topic/113491-solved-problems-with-matching-single-number/#findComment-583160 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.