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? 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]+)/ 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
Archived
This topic is now archived and is closed to further replies.