Re: invalid file name chars (RegEx)
Alan Baljeu <[email protected]> Mon, 25 Jun 2007 15:43:46 -0400
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <01bf01c7b761$2516a420$1dc80ac6@CTI> |
> Regex regex = new Regex ("[\\/:*?<>|]" );
> ...
> Can someone please tell me what I'm doing wrong here?
I think you have the right idea, but probably you have some bad stuff in your regex. I
suggest you try much simpler regexes, and build up.
E.g., Regex regex = new Regex("[ab]");
BTW, there are also simple string functions if you are simply deleting particular
characters.
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com