Tuesday, April 9, 2013

parsing "^[a-ZA-Z]+$" - [x-y] range in reverse order.

Once I was trying to do a simple regex validation for alpha string and i got the strange error :


parsing "^[a-ZA-Z]+$" - [x-y] range in reverse order.


The reason was that in the first range, i wrote a-Z instead of a-z. 

So the string which should have been "^[a-zA-Z]+$" was actually written as 
                                                            "^[a-ZA-Z]+$".

Notice that Z is written in caps in both places. 

I corrected the error and it compiled properly.

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...