aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Token
diff options
context:
space:
mode:
authorAnton Stöckl <anton@stoeckl.de>2013-09-06 12:05:10 +0400
committerAnton Stöckl <anton@stoeckl.de>2013-09-06 12:05:10 +0400
commit31f4bc044d8de237e70116ed73e8bfea6145ae92 (patch)
tree33889330da03da02b9832baf7714581880ed876f /src/NXP/Classes/Token
parent10c04a966fc0099a07a4ed2bc80e6de45cac499f (diff)
Make TokenNumber aware of scientific notation
Update the regex so scientific notation numbers work, e.g.: '1 + 3.5E-8' '1 + 3.5E8'
Diffstat (limited to 'src/NXP/Classes/Token')
-rw-r--r--src/NXP/Classes/Token/TokenNumber.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/Classes/Token/TokenNumber.php b/src/NXP/Classes/Token/TokenNumber.php
index 763ca04..a7eac57 100644
--- a/src/NXP/Classes/Token/TokenNumber.php
+++ b/src/NXP/Classes/Token/TokenNumber.php
@@ -20,6 +20,6 @@ class TokenNumber extends AbstractContainerToken
*/
public static function getRegex()
{
- return '\-?\d+\.?\d*';
+ return '\-?\d+\.?\d*(E-?\d+)?';
}
}