Skip to content

Commit 5dd70f0

Browse files
committed
Remove quotes from strings before importing them.
Signed-off-by: Joey Kleingers <[email protected]>
1 parent 90401f5 commit 5dd70f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/simplnx/Utilities/FileUtilities.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "simplnx/Utilities/StringInterpretationUtilities.hpp"
3939

4040
#include <filesystem>
41+
#include <regex>
4142
#include <string>
4243

4344
namespace nx::core::FileUtilities
@@ -127,7 +128,8 @@ class CSVDataParser : public AbstractDataParser
127128
{
128129
if constexpr(std::is_same_v<T, std::string>)
129130
{
130-
m_Array[index] = token;
131+
const std::regex re(R"(^['"]+|['"]+$)"); // Remove quotes and double quotes
132+
m_Array[index] = std::regex_replace(token, re, "");
131133
}
132134
else
133135
{

0 commit comments

Comments
 (0)