Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 12:36 AM
Authorized User
 
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sachin-csharp Send a message via Yahoo to sachin-csharp
Default Regex Class in C#

Hi All,

Now, I am doing checking for valid solution name for my project.
Let me know how to check valid name for solution by using Regex Class.

ok,
Bye,
Sachin.

Sachin R. Patil
Pune,
India
__________________
Sachin R. Patil
Pune,
India
 
Old September 16th, 2004, 07:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

WHat is an invalid name for a solution???

Brian
 
Old September 17th, 2004, 12:04 AM
Authorized User
 
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sachin-csharp Send a message via Yahoo to sachin-csharp
Default

Hi Brian,

An invalid name for a solution that doesn't contains special character like \<.>/*-+ @ #$%^&~` ect.

But same may useful for checking invalid directory name which contains "\" character.

ok,
Bye,
Sachin.

Sachin R. Patil
Pune,
India
 
Old September 17th, 2004, 11:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

OK, and are we talking a design-time feature, or at runtime? You can use Regex.IsMatch(strText, strRegexp), which returns a boolean value.

The regex would be: "[^\<>./*-_@#$%^&~` ]"

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex pendemv JSP Basics 4 December 8th, 2008 08:29 AM
regex mrame XSLT 12 July 25th, 2008 09:37 AM
More regex help Snib Pro PHP 4 December 16th, 2004 09:56 PM
Need RegEx help Snib Pro PHP 6 November 16th, 2004 06:59 AM
Regex Help boyer99g General .NET 2 October 8th, 2004 05:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.