Regular Expressions 101

Library entries

Amazon Resource Name (ARN) pattern with a named group for each component

Vote

1

Regular Expression
python

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

Description

Loading markdown...
Submitted by Arnoud - a year ago