# How does permalink normalization with regex work?

**URL:** <https://meta.discourse.org/t/how-does-permalink-normalization-with-regex-work/354671>\
**Category:** Product Support\
**Created:** [February 26, 2025, 5:36pm UTC](https://meta.discourse.org/t/how-does-permalink-normalization-with-regex-work/354671 "2025-02-26T17:36:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 26, 2025, 9:01pm UTC](https://meta.discourse.org/t/how-does-permalink-normalization-with-regex-work/354671/2 "2025-02-26T21:01:51Z")

</div>

You don’t need a `\2`. And you need a `\` before the period that you’ure searching for. You’ve got only one thing in parentheses. Maybe something like

```plaintext
/^(/threads/)[^.]+\.(\d+)/?$/threads/\1

```

---

_[View the full topic](https://meta.discourse.org/t/how-does-permalink-normalization-with-regex-work/354671)._
