Skip to content

Commit 4aaabe2

Browse files
committed
Simplified regex patterns.
1 parent 01ea7f1 commit 4aaabe2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/RhythmGameUtilities/Parsers.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ typedef struct
3030
int lineCount;
3131
} ChartSectionInternal;
3232

33-
std::regex CHART_SECTION_PATTERN("\\[([a-z]+)\\]\\s*\\{([^\\}]+)\\}",
33+
std::regex CHART_SECTION_PATTERN(R"(\[([a-z]+)\]\s*\{([^\}]+)\})",
3434
std::regex_constants::icase);
3535

36-
std::regex CHART_SECTION_LINE_PATTERN("([^=]+)\\s*=([^\\r\\n]+)");
36+
std::regex CHART_SECTION_LINE_PATTERN(R"(([^=]+)\s*=([^\r\n]+))");
3737

38-
std::regex JSON_VALUE_PATTERN("(\"[^\"]+\"|\\S+)");
38+
std::regex JSON_VALUE_PATTERN(R"(("[^"]+"|\S+))");
3939

4040
inline std::map<std::string,
4141
std::vector<std::pair<std::string, std::vector<std::string>>>>

0 commit comments

Comments
 (0)