//
//  RegexUtil.m
//  XFFruit
//
//  Created by 陈俊俊 on 15/9/9.
//  Copyright (c) 2015年 Xummer. All rights reserved.
//

#import "RegexUtil.h"

@implementation RegexUtil

+ (BOOL)isValidateNmuberAndFloat:(NSString *)candidate{
    NSString *regStr=@"(^[0-9]+(\\.[0-9]+)?$)";
    NSPredicate *numberTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regStr];
    
    return [numberTest evaluateWithObject:candidate];
}
@end
