Regular Expressions 101

Community Patterns

Check & parse Azure Blob Storage URL for CFE

0

Regular Expression
ECMAScript (JavaScript)

/
^(?<azurePrefix>https:\/\/%%BLOBCONTAINER%%.blob.core.windows.net)\/(?<containerId>\S+)\/(?<inDir>in)\/(?<path>(\S+\/)*?)(?<filename>[^<>:"/\\\|\?\*]+(\.[^<>:"/\\\|\?\*]+)*)$
/
gm

Description

Check and parses a URL to identify following segments:

  • azurePrefix : fix segment identifying the origin of the message. It includes Azure Blob Storage account name.
  • containerId: Identifier of the container. It'll allow to find Sic & tenant to drive the to the right place.
  • inDir : Internal use.
  • path: Optional. specified Path in original container.
  • filename: name of the file.
Submitted by anonymous - 4 years ago