mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
regex: added default support for long queries (#12635)
This commit is contained in:
@@ -40,7 +40,7 @@ pub fn regex_opt(pattern string) ?RE {
|
||||
re.prog = []Token{len: pattern.len + 1} // max program length, can not be longer then the pattern
|
||||
re.cc = []CharClass{len: pattern.len} // can not be more char class the the length of the pattern
|
||||
re.group_csave_flag = false // enable continuos group saving
|
||||
re.group_max_nested = 128 // set max 128 group nested
|
||||
re.group_max_nested = pattern.len >> 1 // set max 128 group nested
|
||||
re.group_max = pattern.len >> 1 // we can't have more groups than the half of the pattern legth
|
||||
|
||||
re.group_stack = []int{len: re.group_max, init: -1}
|
||||
|
||||
Reference in New Issue
Block a user