---
title: "How to capture the exact pattern in TCP-Links Local ports field?"
description: "The Local ports field in the TCP Links plug-in uses PCRE regex syntax and by default matches patterns with wildcards at the start and end. To capture an exact port like 5002, you must specify the pattern without wildcards."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360012119913-geneos-how-to-capture-the-exact-pattern-in-tcp-links-local-ports-field/index.html"
---
The Local ports field in the TCP Links plug-in is using the PCRE regex syntax. By default, it behaves like it is wild-carded in the beginning and end of the pattern. For example, the syntax below:

![Local port 5002](https://docscdn.itrsgroup.com/faq/images/geneos/local-port-5002.png)

It will capture ports 5002, 50021, and 15002. If you only need to capture port 5002, then you need the following syntax:

![Local port 5002 syntax](https://docscdn.itrsgroup.com/faq/images/geneos/local-port-syntax.png)


