Navigation:  Actions > Files > Read File >

Read File Action Text Tab

Previous pageReturn to chapter overviewNext page

This tab of the Read File action specifies the text to search for in the text.

 

Text to find: The text or regular expression to find (optional).  This can be blank to read the entire file/text or specify a regular expression for the text to match.  The Loop action can be used to process all matching lines or values.

 

Notes:

To insert literal bracket [ ] and percent sign % characters within this field, they must be doubled up (just as in any other field), since these are normally interpreted by Visual Build as referencing script code and macros within a field.
. (dot) matches newline characters by default.  Uncheck Dot does not match newline option to prevent . from matching newline characters and perform line-by-line matching.

 

Include all matches: If checked, each match of the expression will be stored in an array element; if unchecked only the first match will be stored.

 

Match handling: Specifies how matching text is stored.  If Store entire match in string is selected, all matching text will be stored.  If Store matching groups in array is selected, each captured group will be stored in an array element in the temporary macro.

 

Fail if no matching text found: If checked and the file is empty or nothing matches the expression, the step will fail.  If unchecked and no match is found, an empty string will be stored in the temporary macro.

 

Log matches: If checked, all matching text found in the file will be logged when the step is built.

 

Macro name: The name of the temporary macro in which to store the text that was read from the file (optional, defaults to storing in the READ_FILE_VALUE if not specified).

 

Category: The category of the temporary macro where the text is stored (optional).

 

Do not escape special characters: Does not escape (double) special characters in the file when storing in a macro.

 

Append to macro value: If checked and the macro already exists, the found text will be appended if the macro already exists.  If unchecked, any existing macro value will be replaced.