Lets say I want to make a balanced capture between the occurrence of an uppercase an a lowercase letter.
words = "I WANT 9()?!., CHOCOLATE milk!"
using the balanced capture, %bxy, how would I match a pattern to correspond to the the the first occurrence of an uppercase letter, followed by a lowercase letter and everything inbetween?
My ideal solution does not work
for match in string.gmatch(words, "%b%u%l") do
print (match)
wait(.1)
end

2 comments
Ideally it should print "I WANT 9()?!., CHOCOLATE m"
I don't understand what you're asking. Can you give examples (what should match, what shouldn't)?