Regular Expressions

Regular Expressions are a powerful and complex pattern that can be used for searching or validating input.

Regular expressions are of the form /pattern/ .  You can use regular expressions in various places in MyPhotoApp.  MyPhotoApp will automatically provide the front end ending slash, so all you need to do is provide the pattern.   

Here is an example of a pattern:


That will test that the input only contains digits.   It does look cryptic and is hard to understand at first, but it provides flexibility and power to you that is much more than could possibly achieve otherwise.   

Another example:

^\(\d\d\d\) \d\d\d\-\d\d\d\d$

Will test that the input is of the form  (ddd) ddd-dddd where the d's are a digit. 

Here are related articles that will help you get up to speed using Regular Expressions.  Many common patterns are already available on the internet, so you can just do a search.  

Related Articles:

Wikipedia Entry:

Regular Expressions For Beginners:

Online Regular Expression Tester:

Library of common regular expressions:

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk