Esko Logo Back to Esko Support
Choose your language for a machine translation:

 

Description

A file name using separation characters (such as an underscore) is used but the string parts after the first separation character and before the last separation character is needed as a SmartName result. The same separation character may or may not be used within the middle part of the string.

This result can be achieved by one String Extract SmartName using a Regular Expression. To create this SmartName follow the steps given below:

Example File Names:

Example Filename

Needed String Result

12345_this the file name_endingpart.pdf

this is the file name

12345_this_the_file_name_endingpart.pdf

this_is_the_file_name

 

Procedure

  1. Create a new SmartName of the type String Extract.
  2. Enter the [File] SmartName in the Extract part of field.
  3. Choose Use regular expression from the Extract Part drop-down menu.

  4. Enter the following regular expression in the text field after Extract Part label:

    Regular Expression
    ^[^_]*_(.*)_[^_]*$
  5. Save the SmartName.

    Other Separation Characters

    To edit which separation character is used, change the underscore in the regular expression provided to the needed character.

Article information
Applies to

Automation Engine all versions

Created15-Dec-14
Last revised 
AuthorMAOG
CW Number 
Contents