By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

Trouble validating an intranet url

P: n/a
Hi,
I'm having trouble validating an intranet URL.

I'm using the regular expresssion validator (though any ideas accepted), and
using the standard Internet URL definition, which is..
http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?

unfortunately this doesn't work with our intranet values, such as (e.g.)

http://homer/wibble/viewDocument.aspx?Data=1789

Does anybody have any ideas?

--
Many thanks.
:)
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Remove the www part?

http://(/[\w- ./?%&=]*)? --- I didn't try this, I just modified it by
looking at what I thought was correct.

It gives you the http:// part with any number of parts that contain any of
the characters of /[\w- ./?%&=]

If you want to, you could even change this to validate file:/// or ldap://
or whatever tickles your fancy.

There are tons of websites out there with custom regular expressions.

Here is the MSDN language reference:
http://msdn.microsoft.com/library/de...geElements.asp
--
Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

Future Business Model - National City Mortgage
"Buggyman" wrote:
Hi,
I'm having trouble validating an intranet URL.

I'm using the regular expresssion validator (though any ideas accepted), and
using the standard Internet URL definition, which is..
http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?

unfortunately this doesn't work with our intranet values, such as (e.g.)

http://homer/wibble/viewDocument.aspx?Data=1789

Does anybody have any ideas?

--
Many thanks.
:)

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.