How to copy and paste numbers that are changing?

I’m not sure how well Kantu’s desktop automation works with SourceExtract, but you could use SourceExtract’s Regex functions. This will get the entire port including the IP:

{
  "Name": "Regex",
  "CreationDate": "2020-2-24",
  "Commands": [
    {
      "Command": "open",
      "Target": "NOTEPAD",
      "Value": ""
    },
    {
      "Command": "sourceExtract",
      "Target": "regex=190\.2\.140\.41:(\d+)",
      "Value": "value"
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "${value}",
      "Value": ""
    }
  ]
}

I am currently unaware on how to use Regex capture groups, however I have asked it Here: How do you use Regex capture groups

I will update this post if I get answers.