jQuery – replace all instances of a character in a string [duplicate]

This question already has answers here: JavaScript – Replace all commas in a string [duplicate] (3 answers) Closed 8 years ago. This does not work and I need it badly $(‘some+multi+word+string’).replace(‘+’, ‘ ‘ ); always gets some multi+word+string it’s always replacing for the first instance only, but I need it to work for all + … Read more

Replace only some groups with Regex

Let’s suppose I have the following regex: -(\d+)- and I want to replace, using C#, the Group 1 (\d+) with AA, to obtain: -AA- Now I’m replacing it using: var text = “example-123-example”; var pattern = @”-(\d+)-“; var replaced = Regex.Replace(text, pattern, “-AA-“); But I don’t really like this, because if I change the pattern … Read more

Visual Studio Clicking Find Results Opens Code in Wrong Window

I’m using Visual Studio 2010 and when I do a “Find in Files” the results are returned to the “Find Results 1” window which is docked below my code editor window. Before, I would double click on one of the results in the Find Results window and the file I clicked on would open in … Read more