# Visual Basic > Visual Basic .NET >  how to find string within a string in a specific format

## Amerigoware

I am trying to use regex to find a string within a string with a format of a program release number as "1.16.5" for example. Dim Str as String = "automaticdoors_1.16.5-1.4.jar" I need to return only the "1.16.5" Unfortunately, Regex formats are difficult for me to figure out.


```
    Private Function GetMatch(Str As String) As String 
Dim V As String Dim M As Match = Regex.Match(Str, "\d{2}") 'this found online only returns 2 digit numbers
```

----------


## .paul.

Try this Regex The . Has special meaning in Regex, so you have to escape it with a /

/d{1}/./d{2}/./d{1}

----------


## .paul.

If you want variable amounts of digits, you can use /d{minvalue, max value}

----------

