I have a string like
FVAL(XXX)="TRUE" AND FVAL(TT)="FALSE"
I want to replace all "TRUE"
and "FALSE"
by TRUE
AND FALSE
.
Now the resultant string should be
FVAL(XXX)=TRUE AND FVAL(TT)=FALSE
Will the code shown below be upto the mark for this.
Regex.Replace("FVAL(XXX)=""TRUE"" AND FVAL(TT)=""FALSE""", "[""]TRUE[""]", "TRUE", RegexOptions.IgnoreCase)
Note: Now I know you guys would say that this is not a constructive question and should be closed, but the reason I asked this is because what I came up with, will have to be written twice once for TRUE
and once for FALSE
, which is not the desired result, instead I want the regex to find and replace just once. Also I have to be absolutely sure that my regex would not miss out any pattern. And lastly if you think this is not constructive enough, then please go ahead and close it.