Zokskorbinian Posted September 12, 2007 Share Posted September 12, 2007 Hi there, i'm just sitting on a LogfileAnalyser. I haven't done RegEx for a long time so i'm a bit out of practise. May you guys can find the error in the pattern... here is the pattern: /^([0-9]*)/(.*)/([a-zA-Z0-9\-_]*)/([a-zA-Z0-9\-_]*)/(IP_[0-9\.]*)/([0-9]*)/([0-9]*)/$/ The error given from php: Warning: preg_match() [function.preg-match]: Unknown modifier '(' in ... i hope you can help me Link to comment https://forums.phpfreaks.com/topic/69008-solved-error-in-regex-pattern/ Share on other sites More sharing options...
effigy Posted September 12, 2007 Share Posted September 12, 2007 A / is your delimiter, so any literal slashes within the pattern must be \/. I recommend changing your delimiter to a character that you're not using, % for example. Link to comment https://forums.phpfreaks.com/topic/69008-solved-error-in-regex-pattern/#findComment-346983 Share on other sites More sharing options...
Zokskorbinian Posted September 12, 2007 Author Share Posted September 12, 2007 How can i change it? Or do you mean the / between the Fields? Link to comment https://forums.phpfreaks.com/topic/69008-solved-error-in-regex-pattern/#findComment-346989 Share on other sites More sharing options...
effigy Posted September 12, 2007 Share Posted September 12, 2007 See this post for more on delimiters. Link to comment https://forums.phpfreaks.com/topic/69008-solved-error-in-regex-pattern/#findComment-346993 Share on other sites More sharing options...
Zokskorbinian Posted September 12, 2007 Author Share Posted September 12, 2007 thank you for the fast answer i solved the problem by escapin' the / Link to comment https://forums.phpfreaks.com/topic/69008-solved-error-in-regex-pattern/#findComment-347132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.