From eaba478647817c934dc8e5323634435e13ffff8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blaise=20de=20Carn=C3=A9?= Date: Thu, 14 Nov 2013 16:47:12 +0100 Subject: [PATCH] add pattern modifiers support to regexes --- lib/hafriedlander/Peg/Compiler/Rule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hafriedlander/Peg/Compiler/Rule.php b/lib/hafriedlander/Peg/Compiler/Rule.php index 9d4b3e5..eb609a4 100644 --- a/lib/hafriedlander/Peg/Compiler/Rule.php +++ b/lib/hafriedlander/Peg/Compiler/Rule.php @@ -135,7 +135,7 @@ function parse_rule() { ((\\\\\\\\)*\\\\/) # Escaped \/, making sure to catch all the \\ first, so that we dont think \\/ is an escaped / | [^/] # Anything except / - )*/@xu' ; + )*/[imsxADSUXJu]*@xu' ; function tokenize( $str, &$tokens, $o = 0 ) { $length = strlen($str); @@ -316,4 +316,4 @@ function compile($indent) { // print_r( $match ) ; return '' ; return $match->render(NULL, $indent) . PHP_EOL . PHP_EOL . implode( PHP_EOL, $functions ) ; } -} \ No newline at end of file +}