Match files, events, and response content

Use readable glob patterns or precise regular expressions to select and exclude files, events, and other values across SFTPPlus MFT.

Many managed file transfer workflows need to decide whether a file, event, or response belongs to the next processing step. SFTPPlus MFT uses matching expressions for these decisions, giving administrators one consistent way to describe both simple and advanced selection rules.

Start with a glob expression

A glob expression is suitable for most file and path rules. The familiar * wildcard matches any sequence of characters, ? matches one character, and a range such as [0-9] matches one character from that range.

For example, *.csv selects CSV files, while report-??.csv selects names such as report-01.csv. Globbing is case-insensitive by default, so the first expression also matches a file named REPORT.CSV.

Combine alternatives and exclusions

SFTPPlus extends basic globbing with OR and negation operations. Use the vertical bar to combine alternatives:

text
*.csv | *.xml

This expression matches either CSV or XML files without requiring a regular expression.

Place an exclamation mark at the beginning to exclude matching values:

text
! *.tmp | *.filepart

This expression accepts values that do not end in .tmp or .filepart. The negation applies to the whole list of alternatives.

Date and time placeholders are also available when a workflow needs to select a value for the current or a previous date. For example, a daily transfer can select only the report whose name contains the current year, month, and day.

Use a regular expression for precise rules

When a glob is not specific enough, mark a regular expression with the m/EXPRESSION/ syntax. Regular expressions support anchors, groups, repetitions, and optional case-insensitive matching. SFTPPlus also provides the e/EXPRESSION/ form to exclude values that match a regular expression.

Glob expressions are usually easier for another administrator to read and maintain. Regular expressions are useful when a rule depends on an exact naming convention or a more complex section of text.

Apply matching consistently across SFTPPlus

Matching expressions are not limited to filtering the source of an automated transfer. They are also used to:

  • Select or exclude file names and paths.
  • Filter audit events before an event handler processes them.
  • Match event metadata such as a path, username, component, or source address.
  • Check content returned in an HTTP response.
  • Define path-based authorization and file-dispatch rules.

Using the same expression syntax in these areas makes a workflow easier to understand. For example, an event handler can use a familiar glob rule to act only on successful transfers from a particular folder.

See the matching expression documentation for the full syntax, date and time placeholders, regular expression modifiers, and configuration examples.