Regular Expressions and Matchhandlers

by Mark 26. June 2008 04:46

For a project I need te get the email adresses out of a string with all kinds of text in it. After a lot of trying I found the matchhandler method. It is quite easy, you just need to adjust the Replace command and add a MatchEvaluator. Then you can use the matchhandler to do anything with the right string. In this case I´m adding it to a generic list.

Regex.Replace(source, @"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)", new MatchEvaluator(MatchHandler));

And add the string to the generic list.

private string MatchHandler(Match m)

{

     col.Add(m.Value);

     return m.Value;

}

Tags:

ASP.Net

Visual Studio 2008 released

by Mark 25. October 2007 11:34

Since a few days the newest version of Visual Studio has been released together with the new 3.5 .Net framework.

It contains tons of new features such as:

  • Javascript Intellisense
  • Multi-targeting support (.Net versions: 2.0, 2.0 and 3.5)
  • Built in AJAX support (no need to install an extra package)
  • New Html web designer (same as Expression Web) and improved CSS support
  • Language improvements and LINQ
  • Access to the .Net Framework Library source code (for more information read this post from Scott Guthrie

When you are a MSDN subscriber you can download it here. If not you can download the 90 day trial of the Team Suite edition here.

Be sure to read this post from Scott Guthrie’s blog 

Tags:

ASP.Net | Visual Studio

Silverlight Alpha 1.1 VS 2008 add in

by Mark 13. August 2007 11:33

I just tried to install the VS2008 SilverlightTools Alpha, but I immediatly ran in to an error. The installation couldn’t start beacause VS2008 was not installed. This suprised me because I just installed thirty minutes before. A some searching I found out that I needed to install the Visual Web Developer.

You can install this by running the VS2008 setup again an choose to add features. Now the Silverlight tools setup runs flawless.

Tags:

Visual Studio | Silverlight

Visual Studio 2008 beta 2 released!

by Mark 8. August 2007 11:32

I just installed VS 2008. The first time that I tried to install it, the installation failed. Apparantly the image (3 gb!) was corrupted and therefore the installation had troubles with the cabinet files of the Document Explorer. I downloaded it again and now the installation went flawless.

Tonight I made my first application. I created an rss reader (bases on Scott Guthrie’s code) which uses LINQ. I think that LINQ is one of the most important new features of the .Net 3.5 framework. It is an feature which uses SQL like statements. I saw an demo of it from Erik Meijer on the dutch DevDays and I immediatly loved it.

Now the next step is to try and expand the rss reader with Silverlight….

Tags:

Visual Studio

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About Me

My name is Pieter Brinkman I am Solution Architect for Sitecore in The Netherlands. My interests are mainly ASP.NET, MSSQL and Content Management Systems.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

RecentComments

Comment RSS

Most comments