'1234' /(?

(?&V))(?.)(?(DEFINE)(?...))/ ←[34;40;4m ←[0m←[37;40m (?

←[0m ←[36;40m The start of a named capturing block (also $1)←[0m ←[34;40;4m ←[0m←[37;40m (?&V) ←[0m ←[36;40m Match a call to the subpattern named ←[0m ←[34;40;4m ←[0m←[37;40m ) ←[0m ←[36;40m The end of the named capturing block←[0m ←[34;40;4m ←[0m←[37;40m (? ←[0m ←[36;40m The start of a named capturing block (also $2)←[0m ←[34;40;4m ←[0m←[37;40m . ←[0m ←[36;40m Match any character (except newline)←[0m ←[34;40;4m ←[0m←[37;40m ) ←[0m ←[36;40m The end of the named capturing block←[0m ←[34;40;4m ←[0m←[37;40m (?(DEFINE) ←[0m ←[36;40m The start of a definition block (skipped during matching)←[0m ←[34;40;4m ←[0m←[37;40m (? ←[0m ←[36;40m The start of a named capturing block (also $3)←[0m ←[34;40;4m ←[0m←[37;40m . ←[0m ←[36;40m Match any character (except newline)←[0m ←[34;40;4m ←[0m←[37;40m . ←[0m ←[36;40m Match any character (except newline)←[0m ←[34;40;4m ←[0m←[37;40m . ←[0m ←[36;40m Match any character (except newline)←[0m ←[34;40;4m ←[0m←[37;40m ) ←[0m ←[36;40m The end of the named capturing block←[0m ←[34;40;4m ←[0m←[37;40m ) ←[0m ←[36;40m The end of definition block←[0m ←[34;40;4m ←[0m #### $_=1234; m{ (?

(?&V)) # match and save to $+{P} (? .) # match and save to $+{Q} # this can be saved in $v_definition = qr// (?(DEFINE) (? ...) # aka (?&V) is three chars ) }xm; #### m{ (?

# The start of a named capturing block (also $1) (?&V) # Match a call to the subpattern named ) # The end of the named capturing block (? # The start of a named capturing block (also $2) . # Match any character (except newline) ) # The end of the named capturing block (?(DEFINE) # The start of a definition block (skipped during matching) (? # The start of a named capturing block (also $3) . # Match any character (except newline) . # Match any character (except newline) . # Match any character (except newline) ) # The end of the named capturing block ) # The end of definition block }x