Allow underscore in equation variable names

This commit is contained in:
Brian Miyaji
2015-04-14 17:53:25 +10:00
parent 7f5d878770
commit 5b3d213849
2 changed files with 20 additions and 17 deletions

View File

@@ -350,7 +350,7 @@ class eqEOS {
preg_replace("/\s/", "", $infix);
//Find all the variables that were passed and replaces them
while((preg_match('/(.){0,1}[&$]([a-zA-Z]+)(.){0,1}/', $infix, $match)) != 0) {
while((preg_match('/(.){0,1}[&$]([a-zA-Z_]+)(.){0,1}/', $infix, $match)) != 0) {
//remove notices by defining if undefined.
if(!isset($match[3])) {