Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^arn:(?P<Partition>[^:\n]*):(?P<Service>[^:\n]*):(?P<Region>[^:\n]*):(?P<AccountID>[^:\n]*):(?P<Ignore>(?P<ResourceType>[^:\/\n]*)[:\/])?(?P<Resource>.*)$
"
gm

Description

This pattern matches the AWS's ARN pattern

Submitted by anonymous - 4 years ago