//
//  NSRegularExpression+MPParsingAdditions.m
//  MathKit
//
//  Created by Kim Wittenburg on 09.09.14.
//  Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//

#import "NSRegularExpression+MPParsingAdditions.h"



@implementation NSRegularExpression (MPParsingAdditions)

- (NSTextCheckingResult *)firstMatchInString:(NSString *)string
{
    return [self firstMatchInString:string options:0 range:NSMakeRange(0, string.length)];
}


- (NSTextCheckingResult *)firstMatchInString:(NSString *)string fromIndex:(NSUInteger)start
{
    return [self firstMatchInString:string options:0 range:NSMakeRange(start, [string length]-start)];
}


- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options
{
    return [self firstMatchInString:string options:options range:NSMakeRange(0, string.length)];
}


- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options fromIndex:(NSUInteger)start
{
    return [self firstMatchInString:string options:options range:NSMakeRange(start, [string length]-start)];
}

@end
