I am not very good in regex so I’m looking for help. I need to fetch content between . and {.
Example:
.aaa { }
.bbb {}
ccc {}
ddd {}
eee {}
I.e. aaa and bbb in a string. This data can change so I want to use a regex for this. Thanks.
Spaces are allowed and new lines are allowed. This is a simple text file.
will match everything between
.and{.Explanation:
(?<=\.)asserts that the preceding character is a dot.[^{]*matches zero or more characters, anything except{.(?=\{)asserts that the following character is a{.To iterate over all matches in a string (C#):