PC Review


Reply
Thread Tools Rate Thread

Case-Insensitive String Replace

 
 
INeedADip
Guest
Posts: n/a
 
      13th Jun 2006
I am parsing a lot of files and need to replace a couple of string
variables, but the string.Replace(string,string) method won't work
because it is case-sensitive.
What would be the best way to do this?

I did find this article:
http://www.codeproject.com/csharp/Fa...sStringRep.asp

What is everyone else doing?

 
Reply With Quote
 
 
 
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      13th Jun 2006
Hi,


The article is very good, I would go with it.


--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"INeedADip" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am parsing a lot of files and need to replace a couple of string
> variables, but the string.Replace(string,string) method won't work
> because it is case-sensitive.
> What would be the best way to do this?
>
> I did find this article:
> http://www.codeproject.com/csharp/Fa...sStringRep.asp
>
> What is everyone else doing?
>



 
Reply With Quote
 
Markus Stoeger
Guest
Posts: n/a
 
      13th Jun 2006
INeedADip wrote:
> I am parsing a lot of files and need to replace a couple of string
> variables, but the string.Replace(string,string) method won't work
> because it is case-sensitive.
> What would be the best way to do this?
>
> I did find this article:
> http://www.codeproject.com/csharp/Fa...sStringRep.asp
>
> What is everyone else doing?


Have you looked at Regex.Replace() yet? It can be configured to be
case-insensitive.

hth,
Max
 
Reply With Quote
 
Don Gollahon
Guest
Posts: n/a
 
      28th Jun 2006
Markus Stoeger wrote:

>
> Have you looked at Regex.Replace() yet? It can be configured to be
> case-insensitive.
>
> hth,
> Max


Can you show an example? The help file doesn't show much.

Thanks.


--

Don Gollahon
(E-Mail Removed)
 
Reply With Quote
 
Don Gollahon
Guest
Posts: n/a
 
      28th Jun 2006
Don Gollahon wrote:

> Markus Stoeger wrote:
>
> >
> > Have you looked at Regex.Replace() yet? It can be configured to be
> > case-insensitive.
> >
> > hth,
> > Max

>
> Can you show an example? The help file doesn't show much.
>
> Thanks.


Never mind. I got figured it out.

--

Don Gollahon
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case Insensitive Search with Sensitive Replace ericswebber@gmail.com Microsoft C# .NET 1 4th May 2006 01:56 PM
how to case select with case-insensitive string ? Tee Microsoft ASP .NET 3 23rd Jun 2004 08:40 PM
how to case select with case-insensitive string ? Tee Microsoft VB .NET 3 23rd Jun 2004 08:40 PM
Case-Insensitive Replace Raterus Microsoft VB .NET 1 18th May 2004 11:11 PM
case insensitive replace Mark Microsoft Dot NET Framework 2 27th Sep 2003 03:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 AM.