Skip to content

Commit

Permalink
match anything that is not a } instead of using the regexp flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ylebre committed Apr 7, 2021
1 parent 55c326a commit b6816c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ private function handleSparqlUpdate(Response $response, string $path, $contents)
// FIXME: Use enums from namespace Pdsinterop\Rdf\Enum\Format instead of 'turtle'?
// parse query in contents
if (preg_match_all("/((INSERT|DELETE).*{(.*)})+/m", $contents, $matches, PREG_SET_ORDER)) {
if (preg_match_all("/((INSERT|DELETE).*{([^}]*)})+/", $contents, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$command = $match[2];
$triples = $match[3];
Expand Down

0 comments on commit b6816c0

Please sign in to comment.