News
: To still receiving newsletters from us please subscribe to our Newsletters:
http://tech.groups.yahoo.com/group/developers-Heaven/
Home
Help
Search
Calendar
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
March 12, 2010, 06:46:40 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Developers Heaven Forum
>
Desktop Programming
>
.NET Programming
>
ASP.NET
>
C# Regular Expression to Removing Subdomains from a URL
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: C# Regular Expression to Removing Subdomains from a URL (Read 129 times)
0 Members and 1 Guest are viewing this topic.
admin
Administrator
Full Member
Offline
Posts: 206
OS:
unknown
Browser:
unknown
C# Regular Expression to Removing Subdomains from a URL
«
on:
August 28, 2008, 09:27:47 AM »
Hello all,
if you need regular expression to remove all the subdomains from a url to leave only the domain name. e.g.
http://rss.abc.def.SiteName.com.edu.au
<after applying regex leave>
SiteName.com.edu.au
Then you can use the following:
Code:
Regex.Replace( mySiteUrl, ".*SiteName", "SiteName", RegexOptions.IgnoreCase );
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Desktop Programming
-----------------------------
=> .NET Programming
===> C# Language
===> Visual Basic .NET
===> ASP.NET
===> Web Services
===> ADO.NET
===> GDI+ and DirectX
===> Security.NET
===> Windows Forms
===> Interoperability
===> CLR
===> Threading
===> Deployment
===> .NET Compact Framework
===> Migrating to .NET
=> Java
=> C/C++ & Visual C++
=> HLA
=> Visual Basic 6
-----------------------------
Web Programming
-----------------------------
=> PHP & Perl
=> ASP
=> Java Script
=> CGI
=> Web design
-----------------------------
DataBase
-----------------------------
=> Oracle
=> SQL Server
=> MySQL
-----------------------------
Operating Systems
-----------------------------
=> Windows
=> Lunix & Unix
-----------------------------
Web Services & webhosting
-----------------------------
=> Free webhosting
===> Free hosting discussions
===> Free hosting offers
===> Free hosting requests
=> Paid webhosting
===> Paid hosting discussion
===> Paid hosting offers
===> Paid hosting requests
===> Dedicated Server & Reseller Discussions and Requests
=> Domain Names
=> Host Talk
-----------------------------
General
-----------------------------
=> General Discussion
=> New member introductions
=> Computers
=> Ask the Author
=> Ads & Offers
=> Developers-Heaven.com Feedback
=> Test things out
-----------------------------
Jobs and Training
-----------------------------
=> Training and Certification
=> Job Opportunities
Enter your search terms
Submit search form
Loading...