I'm making a regular expression for the following line:
Table 'Joella VIII' 6-max Seat #4 is the button
So far, I've got this:
self.tableDetailsRegex = [NSRegularExpression regularExpressionWithPattern:@"Table '[A-Za-z0-9 ]*' [0-9]+-max Seat #[0-9]+ is the button" options:NSRegularExpressionAllowCommentsAndWhitespace error:nil];
if([self.tableDetailsRegex numberOfMatchesInString:line options:NSMatchingReportCompletion range:NSMakeRange(0, line.length)] == 1)
{
NSLog(@"%@", line);
}
So, my regular expression is:
Table '[A-Za-z0-9 ]*' [0-9]+-max Seat #[0-9]+ is the button
And I'm sure the selected line comes by at some point, because I'm printing all the lines a bit further in my code...