473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Check is string is a valid url

Is there any way to check if a string is valid URL?

thanks,
Gonçalo Boléo
Nov 16 '05 #1
3 8597
You can use RegX to validate the text, or use the URI class.

-Rob Teixeira

"Gonçalo Boléo" <go*****@kaid4.pt> wrote in message
news:uO****************@TK2MSFTNGP10.phx.gbl...
Is there any way to check if a string is valid URL?

thanks,
Gonçalo Boléo

Nov 16 '05 #2
You can use the Regex class to do this. I'm sure you can find something
useful at the below site that does it for you or gets you on the right path.

http://www.regexlib.com/Search.aspx

ShaneB

"Gonçalo Boléo" <go*****@kaid4.pt> wrote in message
news:uO****************@TK2MSFTNGP10.phx.gbl...
Is there any way to check if a string is valid URL?

thanks,
Gonçalo Boléo

Nov 16 '05 #3
whether it *could possibly* be valid, or whether it *is* valid?
To get the regex for it, add a RegularExpressionValidator to a web project
and there's a pre-set list of regexes in there, one of them is a URL
template.
If you want to check if it *is* valid, then you'll have to send a request
and see if you get anything back.
"Gonçalo Boléo" <go*****@kaid4.pt> wrote in message
news:uO****************@TK2MSFTNGP10.phx.gbl...
Is there any way to check if a string is valid URL?

thanks,
Gonçalo Boléo

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Maciej Sobczak | last post by:
Hi, I have a string. This string is to be used as a path for a new file. I would like to check if this string *could be* a valid file name, *before* I try to create the file itself. In other...
15
by: Dan S | last post by:
My application asks the user to enter in a date - in the mm/dd/yyyy format. Is there any quick and easy way to verify the date the user enters is formatted correctly? Right now I'm calling...
26
by: JGH | last post by:
How can I check if a key is defined in an associative array? var users = new array(); users = "Joe Blow"; users = "John Doe"; users = "Jane Doe"; function isUser (userID) { if (?????)
4
by: Andrew Banks | last post by:
I'm going to have an admin section to a site I'm developing using ASP.NET C# I want to restrict access to this directory based on username and password (I've got that bit done) but also upon the...
7
by: zjut | last post by:
I need to implement the method : round(String name, int index) The given string maybe the every type of float type, ( the msdn given the regax is that : integral-digits]exponential-digits]) ...
6
by: dave | last post by:
Hello All - Is there a way to check if a file path string is valid? I.e. is there a function that takes some string, say 'c:\somedir\subdir' and returns TRUE if it is valid or FALSE if no such...
1
by: Thomas | last post by:
Hi all, i have to check if a value is a valid date format depending on a "format string" the user specified. For example: Format String: "dd/mm/yyyy" Date Value: "01/12/2006" Valid: Yes! ...
5
by: Steph | last post by:
hello everyone, I would to know how to check the value I am getting from an HTML form. Let's put it that way, I need to get a string and I would like to make sure this is a string and not a...
10
by: Academia | last post by:
I'd like to check a string to see that it is a valid file name. Is there a Like pattern or RegEx that can do that. 1) Just the file name with maybe an extension 2)A full path An help...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.