I'm trying to assert a regex which matches any host and essentially match that the url ends in /profile/documents/<uuid>
This regex below matches exactly /profile/documents/<uuid>
but how can I modify this regex to match anything that ends in /profile/documents/<uuid>
?
expect(res.headers.location).to.match(/^\/profile\/documents\/[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i) // Regex for /profile/documents/:uuid
Examples that'd i'd expect to match are:
http://localhost:3000/profile/documents/8ce825b7-b8c2-468b-a4c8-88eedea5b4c2
http://127.0.0.1/49943/profile/documents/8ce825b7-b8c2-468b-a4c8-88eedea5b4c2