Non-capturing group, recursion and OR operands, PHP regex -
this question has answer here:
- reference - regex mean? 1 answer
- recursive pattern in regex 2 answers
- why order of alternatives matter in regex? 1 answer
(?: [^[] | \[ (?! /?indent] ) | (?r) ) (?: ...) - non-capturing group, whole thing here
(?! ...) - negative lookahead. specifies group cannot match after main expression (if matches result discarded)
(?r) - recursion
i @ beginning of learning regex , not understanding how works whole. guess not understanding aspects or operator or recursion part?
a) how recursion work in context of (?: | b | (?r) )
b) or, in general, behaving "if matches dont go b?", , again (?r) part in context.
thanks!
Comments
Post a Comment