lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I'm trying to write a pattern that matches any string that is a sequence of 
initial caps words. eg ThisIsAnExample

This is for a toy wiki I'm constructing in lua. I currently have (%u%l+%u%l) 
which matches TwoWord examples, but I cant work out how to repeat the 
sequence. I had thought (%u%l+)+ might work, but I'm not sure what that will 
give.

I'd also like to know in a more general sense how to match repeated patterns 
eg. how would I match any length sequence of numberUppercaseLowercase

eg. 1Yl and 1Aa4Bb9Cc

thanks,

Rob