mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
csv node - better regex for number detection
This commit is contained in:
parent
8f94c5efeb
commit
1c4df785fd
@ -138,7 +138,7 @@ module.exports = function(RED) {
|
||||
var line = msg.payload;
|
||||
var linecount = 0;
|
||||
var tmp = "";
|
||||
var reg = /^[-]?[0-9]*\.?[0-9]+$/;
|
||||
var reg = /^[-]?(?!0\d)\d*\.?\d*(E-?\+?)?\d+$/i;
|
||||
if (msg.hasOwnProperty("parts")) {
|
||||
linecount = msg.parts.index;
|
||||
if (msg.parts.index > node.skip) { first = false; }
|
||||
|
Loading…
Reference in New Issue
Block a user