Extract between markers

Keep or remove text between two markers on each line, including the markers.

Input example

abc[123]xyz

Output example

[123]

Start: [ · End: ] · Mode: Keep match