# AssertionError When Matching URL Against Regex in Postman Te

**URL:** <https://community.postman.com/t/assertionerror-when-matching-url-against-regex-in-postman-te/55770>\
**Category:** Help Hub\
**Tags:** tests, variables, collections, responseassertion\
**Created:** [December 18, 2023, 7:46pm UTC](https://community.postman.com/t/assertionerror-when-matching-url-against-regex-in-postman-te/55770 "2023-12-18T19:46:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [December 22, 2023, 1:57pm UTC](https://community.postman.com/t/assertionerror-when-matching-url-against-regex-in-postman-te/55770/2 "2023-12-22T13:57:43Z")

</div>

Hey @eldor488 👋

Welcome to the Postman Community! :postman:

Could you provide more details about the regex that you’re using and the test script that you’re using here, please?

There are several topics on the forum around using regex to match a guid, here one that might help:

> [@Test for format of a UUID](https://community.postman.com/t/test-for-format-of-a-uuid/44358/2):
>
> By using a regex match. Postman uses JavaScript under the hood, so this is easily searchable on the web. [javascript - How to test valid UUID/GUID? - Stack Overflow](https://stackoverflow.com/questions/7905929/how-to-test-valid-uuid-guid)[How to use regular expression in postman script · Issue #4334 · postmanlabs/postman-app-support · GitHub](https://github.com/postmanlabs/postman-app-support/issues/4334) Which will give you something like the following. I’ve put it in a loop, and I’m getting a random guid using Postman dynamic variables. They have the same format as UUID, but please read the first link for more info on this. …

---

_[View the full topic](https://community.postman.com/t/assertionerror-when-matching-url-against-regex-in-postman-te/55770)._
