Use Regex with pattern: \{([^\}]+)\}
Regex yourRegex = new Regex(@"\{([^\}]+)\}");
string result = yourRegex.Replace(yourString, "anyReplacement");
More Related Contents:
- How do I replace the *first instance* of a string in .NET?
- Count regex replaces (C#)
- Regex replace multiple groups
- RegEx to remove single quote, parentheses or square bracket from both beginning and end of a string [closed]
- How do I match an entire string with a regex?
- Regex.Match whole words
- Using RegEx to balance match parenthesis
- Regular expression to remove HTML tags
- Find a string between 2 known values
- Is there an alternative to string.Replace that is case-insensitive?
- Replace only some groups with Regex
- What’s the difference between “groups” and “captures” in .NET regular expressions?
- Need to perform Wildcard (*,?, etc) search on a string using Regex
- Why \b does not match word using .net regex
- Regular Expression for password validation
- RegEx for an IP Address
- Regex that matches a newline (\n) in C#
- Using WebClient in C# is there a way to get the URL of a site after being redirected?
- Regex : how to get words from a string (C#)
- .Net regex: what is the word character \w?
- RegEx – reusing subexpressions
- Regex nested parentheses
- Ignoring white space for a Regex match
- Validating file types by regular expression
- How to make a regex match case insensitive?
- How to use inline modifiers in C# regex?
- Regex for Money
- What is a “Nested Quantifier” and why is it causing my regex to fail?
- Regular expression to validate valid time
- regex to split line (csv file)