Metadata Replacement

The Metadata Replacement connector validates a specified value in the metadata items of the scanned document and changes a specific part of the value using a regular expression. For example, the hyphens in a phone number can be deleted, and all uppercase in the metadata can be changed to lowercase. Also, it can stop the workflow processing when the specified metadata item does not match the specified value.

  • A replacement table is not used for the Metadata Replacement connector.
  • The Metadata Replacement connector changes only the metadata. The details of the scanned document are not changed.

For details about metadata, refer to Categorize Documents with Metadata.

Supported formats (input data)

The Metadata Replacement connector supports all formats compatible with SLNX Scan & Capture.

Convertible formats (output data)

The output data format is the same as the input data.

Metadata Replacement Connector processing conditions

When the specified metadata does not exist in the metadata of the document, the replacement process is skipped, and the delivery flow continues. The process is recorded as being successful in the job log, and the connector being skipped is recorded in the system log.

To configure the properties of the Metadata Replacement connector:

  1. In the Delivery Flow, click the [Metadata Replacement] connector icon.

  1. Specify the display name.

  2. In General Settings, configure the following settings according to the examples provided below.

  3. After configuring the settings, save the workflow.

Usage examples of regular expressions

In addition to Regular Expressions, you can also use the following variables.

Variable

Content

$1, $2, ...

Part that matches a group in a regular expression

$&

Part that matches the entire regular expression

The following are setting examples of regular expressions used to confirm and replace the target values of metadata items.

Example 1: Confirming whether or not a phone number in a document is valid

When a valid phone number has a structure of "(2 to 4 digits)-(2 to 4 digits)-(4 digits)", specify as follows:

  • [Regex]: \d{2,4}-\d{2,4}-\d{4}

  • [Operations]: Select [Use Match Reference Function]

Example 2: Deleting hyphens from a phone number

To delete all hyphens (-) in a phone number with a structure of "(2 to 4 digits)-(2 to 4 digits)-(4 digits)", specify as follows:

  • [Regex]: -

  • [Operations]: Select [Use Match Reference Function]

  • [Text to Replace]: (space)

  • [Replace All]: Select the check box The conversion result is as follows:

    0123456789

Example 3: Changing a document name from the "yyyymmddhhmmss" format to the "yyyymmdd" format

To delete part of the file name and keep only the date when the date and time the file was created are used for the file name, specify as follows:

  • [Regex]: (.{8{)(.*)

  • [Operations]: Select [Use Text Replacement Function]

  • [Text to Replace]: $1

[Replace All]: Select the check box The conversion result is as follows:

20081112

Example 4: Extracting a specified part of the document name

To extract "2008" from the document name "extracted_20081110135026", specify as follows:

  • [Regex]: (.*)(.{4})(.{10})

  • Select [Ignore Upper/Lower Case Characters] and [Disregard Blank Space(s) and Symbol(s)]

  • [Operations]: Select [Use Text Replacement Function]

  • [Text to Replace]: $2

[Replace All]: Select the check box The conversion result is as follows: 2008