Skip to content

Commit

Permalink
dallmann-consulting#85 Multiline Json regex
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasringdal committed Nov 29, 2024
1 parent 6a62e2c commit 7c6f340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OCPP.Core.Server/OCPPMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public partial class OCPPMiddleware
// RegExp for splitting ocpp message parts
// ^\[\s*(\d)\s*,\s*\"([^"]*)\"\s*,(?:\s*\"(\w*)\"\s*,)?\s*(.*)\s*\]$
// Third block is optional, because responses don't have an action
private static string MessageRegExp = "^\\[\\s*(\\d)\\s*,\\s*\"([^\"]*)\"\\s*,(?:\\s*\"(\\w*)\"\\s*,)?\\s*(.*)\\s*\\]$";
private static string MessageRegExp = "^\\[\\s*(\\d+)\\s*,\\s*\"([^\"]+)\"\\s*,\\s*(?:\\s*\"(\\w+)\"\\s*,)?\\s*(\\{[^}]+\\}|\\{[\\s\\S]*?\\})\\s*\\]$";

private readonly RequestDelegate _next;
private readonly ILoggerFactory _logFactory;
Expand Down

0 comments on commit 7c6f340

Please sign in to comment.