From e168d9aab06c12c76edeeff37959af9900121c83 Mon Sep 17 00:00:00 2001 From: ockstadt <36147797+ockstadt@users.noreply.github.com> Date: Tue, 12 Apr 2022 10:47:01 +0200 Subject: [PATCH] fix: regular expression Due to a missing question mark the regular expression does not match strings ending with fa, fal, fals but only fae, fale and false. --- src/PadsJson.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PadsJson.php b/src/PadsJson.php index 3818cb7..0238ec5 100644 --- a/src/PadsJson.php +++ b/src/PadsJson.php @@ -44,7 +44,7 @@ protected function padLiteral($tmpJson) return $tmpJson; } - $match = \preg_match('/(tr?u?e?|fa?l?s?e|nu?l?l?)$/', $tmpJson, $matches); + $match = \preg_match('/(tr?u?e?|fa?l?s?e?|nu?l?l?)$/', $tmpJson, $matches); if (!$match || null === $literal = $this->maybeLiteral($matches[1])) { return $tmpJson;