I am new to regular expressions, I have a text like this:
test{{this should not be selected and the curly brackets too}} but this one { or } should be selected. So I want to exclude all text between an opening and closing curly brackets.
and I want this result
"test"
and
"but this one { or } should be selected. So I want to exclude all text between an opening and closing curly brackets."
This is my expression I used:
$p = '/[a-zA-Z0-9#\' ]+(?![^{{]*}})/';
But this excludes the single curly brackets.
I want to know how to include the single curly brackets with the text and exclude only text between two curly brackets
And please can you give me some good documentation about regex expression? I want to learn more about this.