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(?P<fragment>([!$&\'\\(\\)\\*\\+,\\-\\./\\d:;=\\?@A-Z_a-z\\~]|%[\\dA-Fa-f]{2})*))?$~', 'http://office.react.nl/~daan/PostcodeNl/Api/1.1/dev/RsqlRules/saveRules?rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Bstatus%255D=bla&~Urules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Bid%255D=0a7bf9c1-0069-4b17-9799-1bfcd94e266c&rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Brsql%255D=ALLOW+%2560edit%2560+ON+Session.%2560data%2560+BY+User+as+actor+WHERE+actor+%253D+Session.%2560user%2560&rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Bdescription%255D=User+may+trigger+updates+of+Session+data&rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Bmodule%255D=PostcodeNl_Api&rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Bgroups%255D%255B0%255D=Session&rules%255BSession%255D%255B0a7bf9c1-0069-4b17-9799-1bfcd94e266c%255D%255Beditable%255D=1&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Bstatus%255D=unchanged&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Bid%255D=3fd1c80e-417a-47b1-b0c6-8a5d24e7633f&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+Session.%252A+BY+User+as+actor+WHERE+actor+%253D+Session.user&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Bdescription%255D=Session+can+add%252Fremove+messages+on+self&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Bmodule%255D=PostcodeNl_Api&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Bgroups%255D%255B0%255D=Session&rules%255BSession%255D%255B3fd1c80e-417a-47b1-b0c6-8a5d24e7633f%255D%255Beditable%255D=1&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Bstatus%255D=unchanged&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Bid%255D=b903a5c1-c0a1-43df-a594-8f1bc8563066&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Brsql%255D=ALLOW+%2560view%2560%252C+%2560edit%2560%252C+%2560add%2560%252C+%2560remove%2560+VALUE+message+ON+Session.flashMessages+BY+User+AS+actor+WHERE+message.session.user%253Dactor+OR+EMPTY%2528message.session%2529&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Bdescription%255D=Session+can+add%252Fremove+messages+on+self&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Bmodule%255D=PostcodeNl_Api&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Bgroups%255D%255B0%255D=Session&rules%255BSession%255D%255Bb903a5c1-c0a1-43df-a594-8f1bc8563066%255D%255Beditable%255D=1&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Bstatus%255D=unchanged&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Bid%255D=de43eaad-ae7d-46a5-8034-9a8e94ae9b34&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+Session.%252A+BY+Session+as+actor+WHERE+actor.id+%253D+Session.id&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Bdescription%255D=Session+may+view+own+Session&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Bmodule%255D=React_Session&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Bgroups%255D%255B0%255D=Session&rules%255BSession%255D%255Bde43eaad-ae7d-46a5-8034-9a8e94ae9b34%255D%255Beditable%255D=1&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Bstatus%255D=unchanged&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Bid%255D=f2539666-dd28-49ee-bed6-df0444365270&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Brsql%255D=ALLOW+%2560view%2560%252C+%2560edit%2560%252C+%2560add%2560%252C+%2560remove%2560+VALUE+message+ON+Session.flashMessages+BY+Session+AS+actor+WHERE+message.session%253Dactor+OR+EMPTY%2528message.session%2529&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Bdescription%255D=Session+can+add%252Fremove+messages+on+self&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Bmodule%255D=React_FlashMessenger&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Bgroups%255D%255B0%255D=Session&rules%255BSession%255D%255Bf2539666-dd28-49ee-bed6-df0444365270%255D%255Beditable%255D=1&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bstatus%255D=unchanged&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bid%255D=6b576f1c-d25f-4bac-869c-b98d18575121&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+ApplicationException.%252A%252C+ApplicationHit.%252A%252C+ApplicationHitAggregate.%252A%252C+ApplicationHitPerformance.%252A%252C+ApplicationIncomingRequest.%252A+BY+User+AS+actor+WHERE+actor.%2560cachedIsAdmin%2560&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bdescription%255D=Admins+may+view+logs+of+all+applications&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bmodule%255D=PostcodeNl_Api&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bgroups%255D%255B0%255D=ApplicationException&uules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bgroups%255D%255B1%255D=ApplicationHit&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bgroups%255D%255B2%255D=ApplicationHitAggregate&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bgroups%255D%255B3%255D=ApplicationHitPerformance&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bgroups%255D%255B4%255D=ApplicationIncomingRequest&rules%255BApplicationException%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Beditable%255D=1&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bstatus%255D=unchanged&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bid%255D=a8dd223d-3fc4-4ed1-9dbd-aab3a86c0122&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Brsql%255D=ALLOW+%2560create%2560%252C+%2560add%2560%252C+%2560edit%2560+ON+ApplicationException.%252A%252C+ApplicationHit.%252A%252C+ApplicationHitAggregate.%252A%252C+StatisticAction.%252A&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bdescription%255D=Everyone+can+log+stats&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bmodule%255D=React_StatisticsLogging&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bgroups%255D%255B0%255D=ApplicationException&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bgroups%255D%255B1%255D=ApplicationHit&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bgroups%255D%255B2%255D=ApplicationHitAggregate&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Bgroups%255D%255B3%255D=StatisticAction&rules%255BApplicationException%255D%255Ba8dd223d-3fc4-4ed1-9dbd-aab3a86c0122%255D%255Beditable%255D=1&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Bstatus%255D=unchanged&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Bid%255D=bb5617ee-6066-4c6f-b461-35bca0107bf8&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+ApplicationException.%252A+BY+ApplicationHit+AS+actor&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Bdescription%255D=ApplicationHit+may+view+own+Exceptions&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Bmodule%255D=React_StatisticsLogging&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Bgroups%255D%255B0%255D=ApplicationException&rules%255BApplicationException%255D%255Bbb5617ee-6066-4c6f-b461-35bca0107bf8%255D%255Beditable%255D=1&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bstatus%255D=unchanged&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bid%255D=04e1561a-e7ed-49b8-a9b6-c354f3cb1af6&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+ApplicationHit.%252A%252C+ApplicationHitAggregate.%252A+BY+User+AS+actor+WHERE+%2560application%2560.%2560group%2560.%2560customer%2560+%253D+actor.%2560customer%2560&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bdescription%255D=User+may+view+logs+and+statistics+of+own+applications&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bmodule%255D=PostcodeNl_Api&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bgroups%255D%255B0%255D=ApplicationHit&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Bgroups%255D%255B1%255D=ApplicationHitAggregate&rules%255BApplicationHit%255D%255B04e1561a-e7ed-49b8-a9b6-c354f3cb1af6%255D%255Beditable%255D=1&rules%255BApplicationHit%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bstatus%255D=unchanged&rules%255BApplicationHit%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bid%255D=6b576f1c-d25f-4bac-869c-b98d18575121&rules%255BApplicationHit%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Brsql%255D=ALLOW+%2560view%2560+ON+ApplicationException.%252A%252C+ApplicationHit.%252A%252C+ApplicationHitAggregate.%252A%252C+ApplicationHitPerformance.%252A%252C+ApplicationIncomingRequest.%252A+BY+User+AS+actor+WHERE+actor.%2560cachedIsAdmin%2560&rules%255BApplicationHit%255D%255B6b576f1c-d25f-4bac-869c-b98d18575121%255D%255Bdescrip');
Output for 4.3.3 - 4.3.11, 5.0.0 - 5.0.4, 5.3.23 - 5.3.28, 5.4.0 - 5.4.8, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.3.22, 5.3.29, 5.4.9 - 5.6.28

Process exited with code 139.
Output for 4.3.0 - 4.3.2
Warning: Compilation failed: two named groups have the same name at offset 2416 in /in/pWZhA on line 4