Path Split ?

This wildcard is replaced with a part or section of a string/path, with its delimiter being either a slash (/) or a backslash (). The input string is cut based on the split parameter, which can be a single value or a range. The split parameter can be positive or negative; a positive value cuts the string from the beginning, while a negative value cuts it from the end.

The wildcard is employed in various ways.

  • {path.split.#.?}

  • For the following input (?) --> {path.split.0:2.\myserver\myfolder1\myfolder2\myfolder3}

  • The output is going to be --> \myserver\myfolder1

The split character is the \ (back slash) or / (forward slash) The individual path selection can be done from left to right (with positive numbers i.e 0,1,2,3,4) or right to left (negative numbers i.e -1,-2,-3,-4) (example -1,-2) When the : sign is used, it’s possible to specify a custom path range for the left and right side (example 0:-1). When a selection range is used (:), the number 0 can be used to set the left range on the first occurrence of the file path. -1 sets the right side selection to the end of the file path. Wildcard can be used on Windows and Unix file paths File path needs to be formated as \ (windows) or / (unix)

Advanced examples:

  • Example 1: • Input --> {path.split.2.\myserver\myfolder1\myfolder2\myfolder3} • Output --> myfolder1

  • Example 2: • Input --> {path.split.-3.\myserver\myfolder1\myfolder2\myfolder3} • Output --> myfolder1

  • Example 3: • Input --> {path.split.2:-1.\myserver\myfolder1\myfolder2\myfolder3} • Output --> myfolder1\myfolder2\myfolder3

  • Example 4: • Input --> {path.split.2:-2.\myserver\myfolder1\myfolder2\myfolder3} • Output --> myfolder1\myfolder2

  • Example 5: • Input --> {path.split.0:-2.\myserver\myfolder1\myfolder2\myfolder3} • Output --> \myserver\myfolder1\myfolder2