Skip to content

Commit

Permalink
use m modifier instead of s, which allows capturing both of these sta…
Browse files Browse the repository at this point in the history
…tements:

DELETE DATA { <#hello> <#linked> <#world> . };
INSERT DATA { <#hello> <#linked> <#world> . }
  • Loading branch information
ylebre committed Apr 7, 2021
1 parent 4fee039 commit 55c326a
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).*{(.*)})+/s", $contents, $matches, PREG_SET_ORDER)) {
if (preg_match_all("/((INSERT|DELETE).*{(.*)})+/m", $contents, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$command = $match[2];
$triples = $match[3];
Expand Down

0 comments on commit 55c326a

Please sign in to comment.