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 Quote Link to comment Share on other sites More sharing options...
drifter Posted December 22, 2006 Author Share Posted December 22, 2006 i found a complete work around. Quote Link to comment 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.