Get Updates By E-mail 

Article Written By:
Johann Dowa

Objective-C Library For Easily Creating Regular Expression Like Queries (Verbal Expressions)

  •  
  •  
  •  
  •  
  •  

I’ve mentioned regular expressions a few times, most recently with this free tool for building regular expressions easily that works great for the creation of valid regular expressions to use with NSRegularExpression.

Here’s a handy library called VRXVerbalExpressions that allows you to create regular expression style queries with a verbal syntax.

VRXVerbalExpressions is an Objective-C port of the Verbal Expressions library, and here’s an example from the tests in the source code showing how one could check for a valid url:

id exp = [VRXVerbalExpression create:^(VRXVerbalExpression *r) {
[r startOfLine];
[r then:@"http"];
[r maybe:@"s"];
[r then:@"://"];
[r maybe:@"www."];
[r anythingBut:@" "];
[r endOfLine];
}];

You can find VRXVerbalExpressions on Github here.

Perfect for those of us who don’t use regular expressions all the time.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments