The data model of sgrep is based on regions , which are non-empty substrings of text. Regions are typically occurrences of constant strings or meaningful text elements, which are recognizable through some delimiting strings.
Regions can be arbitrarily long, arbitrarily overlapping, and arbitrarily nested.
The selection of regions is based on mutual containment and ordering conditions of the regions, expressed by the region expression. Different behavior can be specified through command line options. If no input files are given, sgrep reads the standard input. Standard input can also be specified as an input file by giving hyphen '-' as a file name. The selected regions are output in increasing order of their start positions.