jitu99 Posted March 9, 2010 Share Posted March 9, 2010 i need help converting the following ereg function to preg_match function......... preg_match('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); any help would really be appreciated Quote Link to comment https://forums.phpfreaks.com/topic/194641-convert-ereg-to-preg_match/ Share on other sites More sharing options...
thebadbad Posted March 9, 2010 Share Posted March 9, 2010 preg_match('~\$Revision: (\S+)~', $this->revision, $rev); \S is a shorthand character class matching any non-whitespace character. The only other difference is the use of pattern delimiters (tildes in my case), which is required with preg_match(). Quote Link to comment https://forums.phpfreaks.com/topic/194641-convert-ereg-to-preg_match/#findComment-1023682 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.