I am trying for regular expression to get following thing
Input-
{foo}
{bar}
\{notgood}
\{bad}
{nice}
\{bad}
Output-
foo
bar
nice
I want to find all strings starting with {
but NOT with \{
.
I have only five words as input.
I tried a regular expression i.e. "\\{(foo|bar|nice|notgood|bad)"
which gives all words starting with {
. I don't know how to get rid of \{
. How can I do that?