Re: Rexex replace
- From: Peter Duniho <no.peted.spam@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Dec 2009 13:42:19 -0800
tshad wrote:
I am curious why my Regex would not work when like this
tableName = Regex.Replace(tableName, "'$", "")
But worked fine like this:
tableName = tableName.Replace("$", "");
Because the two are not the same? I don't know what you intend the "'$" to do, but as far as I know it won't be anything useful in Regex. I don't think it's the same as "find all instances of the '$' character".
I think probably you want "\$" as your expression, but of course there remains the question of why use Regex when the String.Replace() method already does exactly what you want. The String method will be much more efficient too.
Pete
.
- Follow-Ups:
- Re: Rexex replace
- From: tshad
- Re: Rexex replace
- References:
- Rexex replace
- From: tshad
- Rexex replace
- Prev by Date: Re: How to avoid casting horror with non-generic class derived from generic class
- Next by Date: Re: Class factory desing question
- Previous by thread: Rexex replace
- Next by thread: Re: Rexex replace
- Index(es):
Relevant Pages
|