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