Allow equations to have underscores to prevent errors

This commit is contained in:
Brian Miyaji
2015-09-23 22:12:44 +10:00
parent 9eb6af6925
commit 789840f8f8

View File

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