Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWWDillingham WesleyDillingham <wwdillingham@sugarlabs.org>2009-07-01 19:55:20 (GMT)
committer WWDillingham WesleyDillingham <wwdillingham@sugarlabs.org>2009-07-01 19:55:20 (GMT)
commita293fc8fd47d4caeb1a97fbf789073f2317f36d7 (patch)
tree165b457616794c338f05fc1913fbaed25c6bdc56
parentd4c78a4f890d5cbd287fe9c97439e9cafb681a6f (diff)
"/" -> "\/"
-rw-r--r--order_of_operations_parser.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/order_of_operations_parser.php b/order_of_operations_parser.php
index a984111..156496c 100644
--- a/order_of_operations_parser.php
+++ b/order_of_operations_parser.php
@@ -87,7 +87,7 @@ for (i=0;i<=$numRecords;i++)
//Now we need to determine if a particular question contained ONLY a particular operation
//Matches operations with ONLY ADDITION
- if (preg_match($regexp, $equation) && !preg_match("-", $equation), && !preg_match("/", $equation), && !preg_match("*", $equation))
+ if (preg_match($regexp, $equation) && !preg_match("-", $equation), && !preg_match("\/", $equation), && !preg_match("*", $equation))
{
$only_addition[tok[2]]++
@@ -115,7 +115,7 @@ for (i=0;i<=$numRecords;i++)
}
//Matches equations with ONLY SUBTRACTION
- if (preg_match($regexp, $equation) && !preg_match("+", $equation) && !preg_match("/", $equation) && !preg_match("*", $equation))
+ if (preg_match($regexp, $equation) && !preg_match("+", $equation) && !preg_match("\/", $equation) && !preg_match("*", $equation))
{
$only_subtraction[tok[2]]++
@@ -127,7 +127,7 @@ for (i=0;i<=$numRecords;i++)
//******************************DIVISION********************************
//contains division
- $regexp = "/"
+ $regexp = "\/"
if (preg_match($regexp, $equation))
{
$contains_division[tok[0]]++
@@ -164,7 +164,7 @@ for (i=0;i<=$numRecords;i++)
}
//Matches equations with ONLY Multiplication
- if (preg_match($regexp, $equation) && !preg_match("+", $equation) && !preg_match("/", $equation) && !preg_match("-", $equation))
+ if (preg_match($regexp, $equation) && !preg_match("+", $equation) && !preg_match("\/", $equation) && !preg_match("-", $equation))
{
$only_multiplication[tok[2]]++;
@@ -179,7 +179,7 @@ for (i=0;i<=$numRecords;i++)
//**********************************************COMPOUND EQUATIONS*********************************
// can simply not use regexp but replace with a literal reg expression
- if(preg_match("+", $equation) && (preg_match("-", $equation) || preg_match("/", $equation) || preg_match("*", $equation)))
+ if(preg_match("+", $equation) && (preg_match("-", $equation) || preg_match("\/", $equation) || preg_match("*", $equation)))
{
$compound[tok[0]]++; //NOTE compound_incorrect is implicit