It returns 0 because all the regions have been moved to a nameless subframe now. I was able to discover the regions more or less this way;
Lua Code:
-- Iterate all the bubbles.
-- This function only returns bubbles we can edit,
-- so we can bypass all the forbidden stuff, and save time.
for _, bubble in pairs(C_ChatBubbles.GetAllChatBubbles()) do
-- Iterate the children, as the actual bubble content
-- has been placed in a nameless subframe in 9.0.1.
for i = 1, bubble:GetNumChildren() do
local child = select(i, select(i, bubble:GetChildren()))
if (child:GetObjectType() == "Frame") and (child.String) and (child.Center) then
-- This is hopefully the frame with the content
for i = 1, child:GetNumRegions() do
local region = select(i, child:GetRegions())
if (region:GetObjectType() == "Texture") then
local texture = region:GetTexture()
-- do something
elseif (region:GetObjectType() == "FontString") then
local text = region
-- do something
end
end
end
end
end