Cobra Interactive Query Language contains

NAME

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

SYNTAX

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

DESCRIPTION

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 }.

EXAMPLES

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

SEE ALSO

jump, patterns, qualifiers, stretch

Return to index
Manual
Tutorial
(Last Updated: 7 May 2017)