how to get numbers in message

i would like to get the numbers in message
like for example

eg1. message="hello ur acct# is 1234567890 hello
eg2 message=“1234567890 hello hello”
eg3 message=“hello hello 1234567890”
eg4 message=“hello hello 1234567890 hello hello”

how do i get 10 digit number inside the message
pls help

:foreach i in=[/tool sms inbox find where phone=“+6623423234”] do={
:local smsMessage [/tool sms inbox get $i message]
}

Is it not in a more standard format?
It would help if you post more real example.

Not sure if there is a quick fix.
You can loop trough one and one character in the string, test if its a number, if yes, save it and start a counter.
If then 10 number are found one after one, then this is the phone number.

But if its on the same position in the text every time, its easy to get.

Number may be with or without country code, so no fixed length. What about number from not from your country?

hi sir this is not a cellphone number. this is a account number inside the text message

i need to get the 10digit number inside the text which is randomly sending my client because sometimes they include thier names before or after acct#

Look at this post:
http://forum.mikrotik.com/t/upper-lower-string/93121/1
It shows how to loop through a text string from start to end (len of string)

Then you need to make some logic to extract one and one number.

anyone can help me

Can you read other users posts?