CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 simple URL validator

Print topic Send  topic

Author Message
guarez
Posted: 02/12/2003, 6:25 PM

how i check a URL if is valid? or not?

any simple way?

thnkz
BB
Posted: 02/12/2003, 8:21 PM

Mods to CCS file: CodeChargeStudio/Components/TypeLib.xml:
See http://www.regxlib.com/Default.aspx for more examples

<List name="InputMasks">
<Item value="^[\w\.-]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]+$" name="EMail"/>
<Item value="^\d{5}(-\d{4})?$" name="5/9-digit ZIP Code"/>
<Item value="^((\(\d{3}\)\s?)|(\d{3}\-))\d{3}\-\d{4}$" name="phone number"/>
<Item value="\d{3}-\d{2}-\d{2}-\d{4}" name="Social Security number"/>
<Item value="http://([\w-]\.)+[\w-]*(/[\w- ./?%=]*)?" name="Internet URL"/>
<Item value="^[a-zA-Z]\w{4,13}\d+$" name="Password 6-15 characters, must begin with letter and end with digit"/>
<Item value="^([A-Z]{2})" name="State or Country abbreviation - all caps"/>
<Item value="^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$" name="US and Canadian postal codes"/>
<Item value="([0-1][0-9]|2[0-3]):[0-5][0-9]" name="HH:MM 12 hour"/><Item value="([0-2][0-9]|2[0-3]):[0-5][0-9]" name="HH:MM 24 hour"/>
<Item value="([0-9][0-9][0-9]|3[0-9][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]" name="HHH:MM:SS"/>
<Item value="^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$" name="International Phone Number w/ country code"/>
<Item value="(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14})))" name="Credit card number format validation"/>
<Item value="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" name="Comprehensive email"/>
<Item value="^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$" name="IP Address validation"/>
<Item value="^[a-zA-Z0-9]+$" name="Any alphanumeric string (no spaces)"/>
</List>

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.