Regular Expressions 101

Community Patterns

Saas Path Parser

0

Regular Expression
ECMAScript (JavaScript)

/
^(?<SaasPrefix>d:\\exchanges\\server1)\\((?<sicTenantId>[^<>:"/\\\|\?\*]+)\\)?(?<sicTenantOrContainerId>[^<>:"/\\\|\?\*]+)\\(?<outDir>out)\\(?<path>([^<>:"/\|\?\*]+\\)*?)(?<filename>[^<>:"/\\\|\?\*]+(\.[^<>:"/\\\|\?\*]+)*)$
/
gm

Description

Analyze a text looking for a Saas path (in CFE context).

It should identify following groups:

  • saasPrefix
  • sicTenant Id
  • sicTenantOrContainerId (If containerId is not present, SicTenant will come here)
  • OutDir (internal use)
  • path
  • filename
Submitted by Xvi - 4 years ago