preparation: white out the contents of the regexps and extract curly bracket pairs. No test yet.
added test of curly brackets detection