# Slim3 - Route Regexp for UUID

**URL:** <https://discourse.slimframework.com/t/slim3-route-regexp-for-uuid/2341>\
**Category:** Questions\
**Created:** [April 14, 2018, 12:47am UTC](https://discourse.slimframework.com/t/slim3-route-regexp-for-uuid/2341 "2018-04-14T00:47:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Programster](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/programster/32/1377_2.png) [@Programster](https://discourse.slimframework.com/u/Programster)\
**Post date:** [April 14, 2018, 5:02pm UTC](https://discourse.slimframework.com/t/slim3-route-regexp-for-uuid/2341/3 "2018-04-14T17:02:32Z")

</div>

Hey that looks awesome. However, I am trying to ask how to perform these complex regexpressions in the routes, not get a regexp that matches a UUID (although that does look useful).

E.g. can you give me a tweaked version of:

```
$app->get('/users/{id:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89AB][0-9a-f]{3}-[0-9a-f]{12}$/', function (\Slim\Http\Request $request, Slim\Http\Response $response, $args) {
    // Find user identified by $args['id']
});

```

… that will actually work with slim routes (its not the regular expression itself but how do i place it in the route?) I have tested that the regular expression itself works using an [online tool](https://regex101.com/).

---

_[View the full topic](https://discourse.slimframework.com/t/slim3-route-regexp-for-uuid/2341)._
