Non-capturing group, recursion and OR operands, PHP regex -


this question has answer here:

(?:  [^[]   |   \[  (?! /?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

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -