#import <objc/objc.h>
#import <objc/Object.h>
#import <Foundation/Foundation.h>

@implementation TestObj
int main()
{
	NSString *pattern = @"^/api/v1/news/([0-9]+)/\\?categoryId=([0-9]+)$";
	NSString *string = @"/api/v1/news/123/?categoryId=22";
	NSError *error = nil;
	NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:&error];

	NSRange textRange = NSMakeRange(0, string.length);
	NSRange matchRange = [regex rangeOfFirstMatchInString:string options:NSMatchingReportProgress range:textRange];

	// Did we find a matching range
	if (matchRange.location != NSNotFound)
	    NSLog (@"YES! It is matched!");
	else
	    NSLog (@"NO MATCH!");
	return 0;
}
@end