Regex Delimiters   (Mega-String Options)

 

 

(See also: Other Strings,

  Mega-String Options,

  Mega-String Tool,

  Editing Tools)

 

 

 

 

 

The Regex Delimiters option is only available for these Other category

items:   Single Quote, Double Quote, No Quoting.

 

Delimiters can be entered manually in the start-end edit boxes, or via the

Select Delimiter dialog box (see below).

These are smart edit boxes requiring only a key press to enter both delimiters.

Entry can be done from either box.

 

Only appropriate characters, or character pairs are allowed to be entered.

These are all punctuation and alpha-numeric characters, excluding the backslash \

space characters.

 

Appropriate character pairs include the bracketed sets:  {}  []  () <>

The smart edit boxes correctly insert these pairs. If for example ] is entered as

a start delimiter, [] will be inserted as start/end pairs.

 

 

Verify Button

 

          This button will test the currently selected delimiters against the entire

          text body of the View that invoked the Mega-String tool.

          It is not necessary to use this feature here. It is automatically done

          upon returning to the view if this option is one that is selected.

 

          This tests for delimiter conflicts within the text body.

 

          IMPORTANT Note !!

          Normally, delimiters found in the text body are escaped in the

          Regular Expression enabling the regex engine to parse past the delimiter

          character to find the end of the expression.

          However, it is impossible by normal means, to escape a delimiter character

          in the text body that is already an escaped literal.

 

          A delimiter conflict is an escaped literal delimiter.

 

 

Select Button

 

          This button brings up the Select Delimiter dialog.

          This is a deep analysis tool.

          The dialog has two categories:  Punctuation and Alpha-Numeric

          Each box can be populated by clicking its respective plus (+) button.

          If this dialog is re-entered, previously populated boxes will show their

previous values.

 

          Each box has two list columns.

 

          The first column is the delimiter, the second column is the count of how many

          occurrences of that delimiter that were found in the text body, and that will be escaped.

          To avoid over-escaping, the delimiters with a low count are preferred (all are accepted)

          and probably the ones with a zero count are best.

 

          The second column also has a string indicating a delimiter conflict

denoted as <- badThese delimiters should not be chosen.

They can be selected/chosen, but  a warning will occur by the view that invoked the

Mega-String dialog.

 

          When a delimiter is chosen, it will be automatically inserted into the

start-end smart edit boxes.

 

 

 

Verify Warning Notifications

 

From Verify button – The verify button produces a message either confirming no delimiter conflicts

or information about the conflicts. 

Example,  in this one the parenthesis are chosen. And literal parenthesis are in the regex text body:

 

 

 

From View – After choosing to add delimiters and clicking OK from the Mega-String dialog,

the view (caller) checks the validity of the delimiters by default.

If no conflicts, no message is shown. If there is a conflict, a confirmation message requesting

to continue or cancel will be shown:

 

 

 

 

 

 

 

RegexFormat Help - © 2014 RDNC Software