URL Validation | Regular Expression in AS3
We did a quick web search for a regular expression to verify URLs entered in a form in Flash (Action Script 3.) We didn't find any so Master wrote one up, feel free to use it or improve it. He'll be running more test cases against it but for now it gets the job done on the project we're working on.
^http(s)?:\/\/((\d+\.\d+\.\d+\.\d+)|(([\w-]+\.)+([a-z,A-Z][\w-]*)))(:[1-9][0-9]*)?(\/([\w-
.\/:%+@&=]+[\w- .\/?:%+@&=]*)?)?$
Labels: action script 3, development, open source, regular expressions, source code

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home