Amazon MWS Auth Token Regular Expression

A regular expression to match an Amazon Marketplace Web Services (MWS) auth token.

/amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

Matches:

  • amzn.mws.12345678-3214-4321-1234-123456789101
  • amzn.mws.00a0a000-00a0-0000-a0a0-a00a0000a0a0

Non-matches:

  • 12345678-3214-4321-1234-123456789101
  • amzn.12345678-3214-4321-1234-123456789101
  • amzn.mws.12345678-3214-4321-12340-123456789101