Regex with Action Script 3.0

In programming resources, the regular expressions are one of less the most used tools most advanced and at the same time one of .

Regular expression is a method that uses some characters with meaning special to specify a text standard, that is, a standard of characters, especially formatted, that allows to inside locate and to recognize a stretch of text of another one (that is, it recognizes one inside string of another one ).
Basically, a set of characters is defined, a sequence for them and the position where it desires finds them . So, you can create rules to validate e-mails in forms, to confer telephones, to identify strange names and much more . The support the regular expressions (also known as regexp, regex and ER) can be found in programs as sed, awk and grep, in publishers of text as vi and emacs, and in programming languages as C, Perl, java, python, php etc . To understand as this technology functions and places it in practical is not something simple.

In Action Script 3.0 the new RegExp Class was implemented, in the classr is used the method exec to execute the search of the regular expression, returning if it is a valid email or not.

the code:

[swf], 510, 310[/swf]

Class RegExp in Action Script 3.0

Was this article helpful? feel free to make a donation and help keep the blog in the air
ActionScript 3.0

Leave a Reply