Core Compression




Core Compression options can be set from the Formatting Section

of the Flags Pane. These particular options affect only Formatted

output of the current document.


(See also Formatting)



(From Flags Pane)





Enable Compression Mode

          Normally, most grouping construct want to start on a new

          line at the current formatting indent. To reduce excessive

          noise like this, its core is analyzed to see if its entirety

can stay on a single line.

If its core qualifies, its size is chacked against the

Maximum Core Length value. And if its core length is less

than this value, the entire construct will be on a single line.

The maximum core length can be entered here by right

Clicking where the number is (see above). For quick

access, the Compression mode and max length can be

set from the ‘Max Core:’ check box and value spinner

on the Input Pane.

The lower the max length value, the more verbose the

formatted output. Turning compression off is the most



Compress Conditional Core

          If compression mode is enabled, setting this option will

          compress the core of the conditional on a single like.

          Its core must qualify and checked against the Maximum

Core Length setting. This compresses the ‘condition’ in

If  (?(condition)  do this | else do that ).

If unchecked, the condition statement becomes verbose

and is expanded over more than a single line.

This check is used for Expressional and Assetion conditionals.


Trim Core edge Whitespace

          If compression mode is enabled, setting this option will

          trim extra whitespace around its core. Note that at

          minimum, a space always surroud grouping constructs.

          If the grouping has no body, a single separating space

          will be inserted. When this is disabled, any naturally

          occuring whitespaces will not be trimmed.


Group after alternation

          Normally, an alternation preceeding a grouping construct

(possibly separated by non-newline whitespace)

          will cause the construct to seek a new line to exist on.

          If this flag is set and compression is enabled, the start

          of the grouping construct will follow the alternation.

          Also, if the group qualifies and is below the max core length

          threshold, it will be entirely on that single line.



Note that RegexFormat attempts to passively format the natural

expression, preserving as much as possible the existing formatting.

An important part of this is preserving the natural newline.

Natural newlines are printed no matter where they are.


Natural Newlines

Final editing (touch-ups) are usually accomplished in the output

Editor. But, should you find a situation where the natural newlines

disrupt an otherwise good format, try some of these remedies.


  1. If there are no comments, from the input editor use the

context menu to remove all newlines (or duplicate newlines),

then format it.


  1. If comments, and they are to be disgarded (but non-newline

Whitespace formatting retained), disable comment print from

here Cmt Print, format it, copy the entire Formatted output into

a new document’s Input Pane editor. Then do remedy 1. above.


  1. With or whithout comments, compress the input, copy the

Compressed output into a new document’s input editor.

Then do remedy 1. above. Note that compressing the regex

will remove all comments and whitespace, but upon formatting

this output, there will be a very clean base upon which to do




RegexFormat Help - © 2014 RDNC Software