Commit fa66a8dc authored by daniel.bub's avatar daniel.bub
Browse files

[FIX #132] fix regex for integer recognition

parent 685da7f2
......@@ -138,7 +138,7 @@ void WProtonData::detectColumnTypesFromCsvData( WDataSetCSV::ContentSPtr csvData
std::string WProtonData::determineColumnTypeByString( std::string cellValue )
{
std::regex regexInt( R"(^-?[[:d:]]+$)" );
std::regex regexInt( R"(^[-\+]?[[:d:]]+([eE]\+?0?[1-9])?$)" );
std::regex regexDouble( R"(^([+-]?(?:[[:d:]]+\.?|[[:d:]]*\.[[:d:]]+))(?:[Ee][+-]?[[:d:]]+)?$)" );
if( std::regex_search( cellValue, regexInt ) )
......
......@@ -25,6 +25,7 @@
#include <list>
#include <string>
#include "WDatatype.h"
#include "WSingleSelectorName.h"
std::string WSingleSelectorName::getX()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment