Cobra Interactive Query Language contains


contains — move current marks to pattern(s) that appear inside the range associated with the mark


	c[contains] [no] [top|up] pattern [pattern2]


This command is used to retain a current mark only if the following two conditions are met:
  • the mark is associated with a range (e.g., a parenthesis, a brace, a bracket, or a user-defined range)
  • at least one token in that range matches the pattern(s) specified.
The use of the qualifier no retains the mark only if the pattern is absent.
The use of the qualifier top restricts matches to the top nesting level.
The use of the qualifier up increases that to the nesting level one higher.

If the range corresponds to a (, ), [, ], {, or } token, then the nesting level is determined by that token.
If the range is user-defined, e.g., with a stretch command, then the nesting level is that of the surrounding block, as determined by the curly braces { and }.


	: m switch		# mark switch statements
	: n {			# move to next { token
	: c no top default	# switch without a default


jump, patterns, qualifiers, stretch

Return to index
(Last Updated: 7 May 2017)