How to extract number from string?

So I got the text right down below.

Enter your code on the PayPal website. CODE: 526432. Msg and data rates may apply. Reply HELP for help, STOP to cancel.
How can I extract the code: 526432
I tried sourceExtract with regex=[0-9]{6} but it seem doesn’t work. I’ve tested the regex with regex101 and the text work fine.
How can i get the code and store it into a variable.
Thanks everybody, sorry for my bad english

I tested sourceExtract with your regex on this forum page and it works fine!

For the Paypal website: Are you sure the number 526432 is inside the page source code? It might be an image or rendered on the fly by some Javascript. You can test to scrape it with the store Text command - but Paypal might block this web scraping method, too.

But what will work for sure is screen scraping with OCR and OCRExtractRelative.

Regex works on the forum page:

{
  "Name": "regex",
  "CreationDate": "2020-11-3",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://forum.ui.vision/t/how-to-extract-number-from-string/6418",
      "Value": ""
    },
    {
      "Command": "sourceExtract",
      "Target": "regex=[0-9]{6}",
      "Value": "a"
    },
    {
      "Command": "echo",
      "Target": "${a}",
      "Value": "blue"
    }
  ]
}

Alternative and fast way is storetext and executeScript_Sandbox with split function