I’m working with regular expressions (Regex) but not finding the exact output.
I want to find the values between two curly braces
{ Value } = value
I use the following pattern but not getting the exact output; it does not remove first “{” …
string pattern = "\\{*\\}";
If my value is {girish}
it returns {girish
Instead of this I want girish as output…
I’m surprised that pattern works to start with – it should be matching zero or more braces. You need to group the content within the brace:
Then extract the contents of the matched group. You haven’t shown what code you’re using to extract the output, but in this case it will be in group 1. For example: