Chet icon indicating copy to clipboard operation
Chet copied to clipboard

Add "Format" operation to RegEx command

Open craigmox opened this issue 5 months ago • 0 comments

Adds another "Format" operation to the RegEx post-processing command.

It allows you to match a line with a regex expression that includes zero or more match groups, and replace it with a value that calls out any of the match group values using the standard Delphi Format() specifiers.

Example:

The post-process script command:

RegEx("(\w+) = (\w+);", "%1:s_ptr = ^%2:s;", "Format")

Converts a line in a output file:

  large_int = Int64;

To:

  large_int_ptr = ^Int64;

craigmox avatar Oct 01 '24 17:10 craigmox