@@ -90,7 +90,7 @@ public function endOfLine($enable = true)
90
90
*/
91
91
public function then ($ value )
92
92
{
93
- return $ this ->add ("( " .self ::sanitize ($ value ).") " );
93
+ return $ this ->add ("(?: " .self ::sanitize ($ value ).") " );
94
94
}
95
95
96
96
/**
@@ -114,7 +114,7 @@ public function find($value)
114
114
*/
115
115
public function maybe ($ value )
116
116
{
117
- return $ this ->add ("( " .self ::sanitize ($ value ).")? " );
117
+ return $ this ->add ("(?: " .self ::sanitize ($ value ).")? " );
118
118
}
119
119
120
120
/**
@@ -127,7 +127,7 @@ public function maybe($value)
127
127
*/
128
128
public function anything ()
129
129
{
130
- return $ this ->add ("(.*) " );
130
+ return $ this ->add ("(?: .*) " );
131
131
}
132
132
133
133
/**
@@ -141,7 +141,7 @@ public function anything()
141
141
*/
142
142
public function anythingBut ($ value )
143
143
{
144
- return $ this ->add ("([^ " . self ::sanitize ($ value ) ."]*) " );
144
+ return $ this ->add ("(?: [^ " . self ::sanitize ($ value ) ."]*) " );
145
145
}
146
146
147
147
/**
@@ -154,7 +154,7 @@ public function anythingBut($value)
154
154
*/
155
155
public function something ()
156
156
{
157
- return $ this ->add ("(.+) " );
157
+ return $ this ->add ("(?: .+) " );
158
158
}
159
159
160
160
/**
@@ -168,7 +168,7 @@ public function something()
168
168
*/
169
169
public function somethingBut ($ value )
170
170
{
171
- return $ this ->add ("([^ " . self ::sanitize ($ value ) ."]+) " );
171
+ return $ this ->add ("(?: [^ " . self ::sanitize ($ value ) ."]+) " );
172
172
}
173
173
174
174
/**
@@ -203,7 +203,7 @@ public function replace($source, $value)
203
203
*/
204
204
public function lineBreak ()
205
205
{
206
- return $ this ->add ("( \\n|( \\r \\n)) " );
206
+ return $ this ->add ("(?: \\n|( \\r \\n)) " );
207
207
}
208
208
209
209
/**
@@ -417,14 +417,14 @@ public function multiple($value)
417
417
public function _or ($ value )
418
418
{
419
419
if (strpos ($ this ->prefixes ,"( " )===false ) {
420
- $ this ->prefixes .= "( " ;
420
+ $ this ->prefixes .= "(?: " ;
421
421
}
422
422
423
423
if (strpos ($ this ->suffixes , ") " )===false ) {
424
424
$ this ->suffixes .= ") " ;
425
425
}
426
426
427
- $ this ->add (")|( " );
427
+ $ this ->add (")|(?: " );
428
428
429
429
if ($ value ) {
430
430
$ this ->add ($ value );
0 commit comments