EXTREMELY useful Regular Expressions in Flex

Regular expressions are very powerful tools for performing pattern matches, we can create a regular expression for validating a UPS tracking number, InfoNotice number and decided to do a quick RegExp for validating a USA postal code with JavaScript(@see 10+ Useful JavaScript Regular Expression Functions to improve your web applications efficiency), in fact, Regular Expressions are included in most of the popular develop languages like PHP, PERL, Java… of course Flex.

What can Regular Expressions do? A regular expression describes a pattern that is used to find and manipulate matching text in strings. Regular expressions resemble strings, but they can include special codes to describe patterns and repetition.

For example:

/([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}/

Above expression will be to match a valid e-mail address.

Yes, the Regular Expressions is very useful but write a regular is not an easy work, is there any tool help us to validate it in Flex? The answer is “Of course”.  gskinner.com built a EXTREMELY useful Regular Expressions in Flex, we can test our own regExp with this tool.

RegExr

Following is the url: http://gskinner.com/RegExr/, enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *