I left a copy of the original preg above the update in the script plus a backup script appended with _ in the same dir
I used sample values returned for
$post_data[$col_msg_text], extracted/substituted values/variables for
$post_data[$col_bbcode_uid]
and tested the original capturing sub-pattern matches in
$code_data[ 1 ][ 0 ] and
$code_data[ 2 ][ 0 ].
Under the existing pattern,
$code_data[ 2 ][ 0 ] didn't return anything ( when the code blocks are named as lexikos stated ), which was the issue.
I just simplified the approach of obtaining the capturing sub-pattern matches and stress tested it.
(wish there was an easier/cleaner way to debug though)
I left a copy of the original preg above the update in the script plus a backup script appended with _ in the same dir :)
I used sample values returned for [c]$post_data[$col_msg_text][/c], extracted/substituted values/variables for [c]$post_data[$col_bbcode_uid][/c]
and tested the original capturing sub-pattern matches in [c]$code_data[ 1 ][ 0 ][/c] and [c]$code_data[ 2 ][ 0 ][/c].
Under the existing pattern, [c]$code_data[ 2 ][ 0 ][/c] didn't return anything ( when the code blocks are named as lexikos stated ), which was the issue.
I just simplified the approach of obtaining the capturing sub-pattern matches and stress tested it.
(wish there was an easier/cleaner way to debug though)