Skip to content

Commit

Permalink
Merge pull request #10 from pdsinterop/multiline
Browse files Browse the repository at this point in the history
match anything that is not a } instead of using the regexp flags
  • Loading branch information
ylebre authored Apr 7, 2021
2 parents 0667b76 + b6816c0 commit 7d0659b
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 7d0659b

Please sign in to comment.