in reply to Re^2: Regex to match between [ref] and [/ref]
in thread Regex to match between [ref] and [/ref]

Not very surprising, is it? Regexes that do not contain capturing parenthesis don't set $1.
  • Comment on Re^3: Regex to match between [ref] and [/ref]