Extract End Of Folder Path Using Regular Expressions

Document created by paul_pasko Employee on Nov 30, 2011
Version 1Show Document
  • View in full screen mode
Within a given Process scenario, you may have the need to extract the folder name at the end of a path. 

For example, within the Unix enviornment, you may have a folder path:

\\prod\boomi\working

and you wish to return the 'working' folder name.

     In a Data Process shape, enter the following in the 'Text To Find' field of the 'Search/Replace' step and leave the 'Replace with' field blank

.*(\\)
     
     0EM40000000PEIi

     This will return

'working'

     Note:  The number of subfoldes involved matters not.  You would still use the above strategy.  So, for example, if the folder structure was \\prod\boomi\working\test\results, .*(\\) would still return the last directory name (results).

Attachments

    Outcomes