iPhone Wax doesn't deal well (or really, at all) with variable argument functions like predicateWithFormat. When it comes to things like this, I write a quick wrapper in Obj-C and use that in the Lua code. Something like this should work:
Obj-C
@implementation NSPredicate (LuaHacks)
+ (NSPredicate *)predicateWithFormat:(NSString *)format varArg1:(NSString*)varArg1
{
return [NSPredicate predicateWithFormat:format, varArg1];
}
then, in Lua, you use it as:
local pred = NSPredicate:predicateWithFormat_varArg1("SELF MATCHES %@ ", "[0-9]{0,25}+$")