Try doing this in your code:
NSCharacterSet * everythingThatsAllowedSet = [NSCharacterSet characterSetWithCharactersInString: @"ABCDEFGHIJKLMNOPQRSTUVWXYZ-"];
NSCharacterSet * characterSetFromRegistrationCode = [NSCharacterSet characterSetWithCharactersInString: registrationCode];
if([everythingThatsAllowedSet isSupersetOfSet: characterSetFromRegistrationCode ] == YES)
NSLog( @"this is a valid registration code");
else
{
// if there are any characters in the registration code that aren't members of
// the everythingAllowed set, the "isSupersetOfSet" test will fail
NSLog( @"this has invalid characters");
}