Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separatorpipe

Summary

The Sections (Sections selection) parameter provides a way to select one or more sections (subsets) of the code to be shown. This makes it possible to focus the user's attention to specific sections of code and ignore superfluous lines. Powerful regular expression (regex) based selection can used to precisely control the selection.

Details

Include Page
_SectionsParameterTable
_SectionsParameterTable

Tips

Tip
titleUsing capture groups to pinpoint lines

By using capture groups in the regex, the exact lines to include can be specified. Normally, line identifiers are inclusive. This means that the line that matches the regex are included in the subset of lines. However, by constructing a regex with a capture group, a more precise location can be identified.

  • For regex used for a range value, the first capture group pinpoints the line number to be used. 
  • For a single regex, the first capture group identifies the start line and the second capture group identifies the final selected line.

Note that \n can be used to identify the line end character no matter what the original source has for line ends. Selection logic is consistent since all code is normalized to the Unix-style line ends.

Examples


Table plus
autoNumbertrue


Example

Description 

%%#region.*(\n)%% Select the line after the line containing #region.
%%(.)\n#endregion%%Select the line before the line containing #endregion.