Click here to Skip to main content
14,934,026 members
Home / Discussions / C#
   

C#

 
QuestionString.Replace() & Regex.Replace() not working Pin
Mou_kol15-May-21 22:40
MemberMou_kol15-May-21 22:40 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Tony Hill15-May-21 23:30
MemberTony Hill15-May-21 23:30 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol15-May-21 23:36
MemberMou_kol15-May-21 23:36 
SuggestionRe: String.Replace() & Regex.Replace() not working Pin
Tony Hill16-May-21 0:04
MemberTony Hill16-May-21 0:04 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol16-May-21 0:21
MemberMou_kol16-May-21 0:21 
AnswerRe: String.Replace() & Regex.Replace() not working Pin
OriginalGriff16-May-21 0:20
mveOriginalGriff16-May-21 0:20 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol16-May-21 0:21
MemberMou_kol16-May-21 0:21 
AnswerRe: String.Replace() & Regex.Replace() not working Pin
Gerry Schmitz16-May-21 11:04
mveGerry Schmitz16-May-21 11:04 
It's fun to chain .Replace but it keeps you from knowing what's happening from one to the next.

It's not any faster than using the occasional intermediate variable.

If you chain that many, at least put them on a separate line.
string strformula = Regex.Replace(maindata, "\"" + data
   .Replace("(", "\\(")
   .Replace(")", "\\)")
   .Replace("$", "\\$") + "\"", "W51",RegexOptions.IgnoreCase);

Then it should also be obvious that "data" should have it's own statement.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food

QuestionBug in form font Pin
Ismael Oliveira 202112-May-21 4:12
MemberIsmael Oliveira 202112-May-21 4:12 
QuestionRe: Bug in form font Pin
Richard MacCutchan12-May-21 5:26
mveRichard MacCutchan12-May-21 5:26 
AnswerRe: Bug in form font Pin
OriginalGriff12-May-21 5:27
mveOriginalGriff12-May-21 5:27 
AnswerRe: Bug in form font Pin
Ismael Oliveira 202117-May-21 10:08
MemberIsmael Oliveira 202117-May-21 10:08 
GeneralRe: Bug in form font Pin
Richard MacCutchan17-May-21 21:05
mveRichard MacCutchan17-May-21 21:05 
AnswerRe: Bug in form font Pin
OriginalGriff12-May-21 5:26
mveOriginalGriff12-May-21 5:26 
GeneralRe: Bug in form font Pin
Ismael Oliveira 202117-May-21 10:06
MemberIsmael Oliveira 202117-May-21 10:06 
Question[SOLVED] Problem in a Web Service Pin
Luis M. Rojas12-May-21 3:54
MemberLuis M. Rojas12-May-21 3:54 
AnswerRe: Problem in a Web Service Pin
OriginalGriff12-May-21 5:20
mveOriginalGriff12-May-21 5:20 
General[SOLVED] Re: Problem in a Web Service Pin
Luis M. Rojas12-May-21 5:23
MemberLuis M. Rojas12-May-21 5:23 
Questiondata clustering Pin
Ahmed Alamdy10-May-21 14:02
MemberAhmed Alamdy10-May-21 14:02 
AnswerRe: data clustering Pin
Dave Kreskowiak10-May-21 19:27
mveDave Kreskowiak10-May-21 19:27 
AnswerRe: data clustering Pin
OriginalGriff10-May-21 20:21
mveOriginalGriff10-May-21 20:21 
AnswerRe: data clustering Pin
Pete O'Hanlon10-May-21 20:58
mvePete O'Hanlon10-May-21 20:58 
GeneralRe: data clustering Pin
OriginalGriff10-May-21 21:58
mveOriginalGriff10-May-21 21:58 
QuestionRegistry Redirection Pin
Richard Andrew x648-May-21 10:41
professionalRichard Andrew x648-May-21 10:41 
AnswerRe: Registry Redirection Pin
Dave Kreskowiak8-May-21 11:22
mveDave Kreskowiak8-May-21 11:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.