drifter Posted December 21, 2006 Share Posted December 21, 2006 OK this is from the template engine.[code] // matches bracket portion of vars // [0] // [foo] // [$bar] // [#bar#] $this->_var_bracket_regexp = '\[[\$|\#]?\w+\#?\]'; // matches $ vars (not objects): // $foo // $foo[0] // $foo[$bar] // $foo[5][blah] $this->_dvar_regexp = '\$[a-zA-Z0-9_]{1,}(?:' . $this->_var_bracket_regexp . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*';[/code]So I want to tweak the last one so that it will accept $foo + $bar or $foo - $bar[0] or $foo + 4basically I want to take the same expression and be able to add 0 or more of these expressions to the end (or integers) with +- operationsI know this should be easy since most of it is there.Thanks Scott Link to comment https://forums.phpfreaks.com/topic/31537-solved-template-engine-regex-tweak/ Share on other sites More sharing options...
drifter Posted December 22, 2006 Author Share Posted December 22, 2006 i found a complete work around. Link to comment https://forums.phpfreaks.com/topic/31537-solved-template-engine-regex-tweak/#findComment-146158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.