# \[RESOLVED\] Regex to change port

**URL:** <https://forum.suricata.io/t/resolved-regex-to-change-port/4516>\
**Category:** Help\
**Tags:** rules\
**Created:** [March 10, 2024, 2:43pm UTC](https://forum.suricata.io/t/resolved-regex-to-change-port/4516 "2024-03-10T14:43:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![volga629-1](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/volga629-1/32/2741_2.png) [@volga629-1](https://forum.suricata.io/u/volga629-1)\
**Post date:** [March 10, 2024, 2:43pm UTC](https://forum.suricata.io/t/resolved-regex-to-change-port/4516/1 "2024-03-10T14:43:08Z")

</div>

Hello Everyone,  
I need small help to adjust port from 5060 to $SIP\_PORTS in rules file

I tried

```auto
re:. "$HOME_NET 5060" "$HOME_NET $SIP_PORTS"

```

```auto
re:. "$HOME_NET 5060" "\\1 $HOME_NET $SIP_PORTS"

```

But the incorrect  
Any help thank you.

---

<div class="post-metadata">

**Author:** ![volga629-1](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/volga629-1/32/2741_2.png) [@volga629-1](https://forum.suricata.io/u/volga629-1)\
**Post date:** [March 10, 2024, 8:23pm UTC](https://forum.suricata.io/t/resolved-regex-to-change-port/4516/2 "2024-03-10T20:23:43Z")

</div>

Resolved

```auto
re:. "\\$HOME_NET 5060" "\$HOME_NET \$SIP_PORTS"

```
