From 7c52f6a93b37f15da59ea4bdd50365f04c3f24c6 Mon Sep 17 00:00:00 2001 From: pduchesne Date: Sat, 18 May 2024 17:03:48 +0200 Subject: [PATCH] fix number regex to accept upper and lowercase E notation --- src/n3parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/n3parser.js b/src/n3parser.js index 50e8bb79a..64bb5db5d 100644 --- a/src/n3parser.js +++ b/src/n3parser.js @@ -209,7 +209,7 @@ var eol = new RegExp("^[ \\t]*(#[^\\n]*)?\\r?\\n", 'g'); var eof = new RegExp("^[ \\t]*(#[^\\n]*)?$", 'g'); var ws = new RegExp("^[ \\t]*", 'g'); var signed_integer = new RegExp("^[-+]?[0-9]+", 'g'); -var number_syntax = new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?(e[-+]?[0-9]+)?", 'g'); +var number_syntax = new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?([eE][-+]?[0-9]+)?", 'g'); var datetime_syntax = new RegExp('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?'); var digitstring = new RegExp("^[0-9]+", 'g');