You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This action has been deprecated and replaced with the Text Find / Replace Action and the Replace Variables action. Please use one of these actions where possible.

The text replace action allows you to replace strings and FinalBuilder variables in a file with specified values.

This will only work on Text files, do not attempt to use it with binary files.

If you want to only search for content, use the Text Find Action.

Details

Files

Filename

New filename

Specify a source and a destination file. If you want the replacements to be written to the same file as the source, leave the 'New Filename' blank.

Replace options

Replace Variables

If this box is checked, FinalBuilder variables will be replaced with their values. Mark variables you want replaced with percent signs, ie %VarName%

The Text Replacement action does not discriminate between FB Variables and regular percent signs, so either escape "real" percent signs as "%%" (these can even then be replaced with % using Replace Text), or use a different notation and replace specific strings instead.

Write byte order mark

Replace text

Replace text options

Search text

Replace text

Case sensitive

Replace whole words only

Match search string as regular expression 

If this box is checked, the search string will be treated as a Regular Expression (see the Regular Expression reference.)

The Case Sensitive and Whole Words Only options do not apply if this option is selected (they will be greyed out.)

Fail if less than X replacements made

The action can be set to fail if an insufficient amount of replacements are made. This is useful to check that there isn't a syntax error or other mistake in the text file.

Max replacements

The action will replace only the first N matches it finds. Set to zero to replace all matches.

 

  • No labels