Extrapolate part from string variable

Hello!

If I have a string variable (ex “A25”) and i Would like to extract only “25” from this string,
I have to use the “MID” function of calc with the command call.function?

callfunction(“MID”,…)

Thanks in advance

Good Life

LO: 5.2 and 5.3

SO: Windows 7 and 10

Hi

With EditFind & Replace:

  • Find: \D
  • Replace: nothing (keep empty)
  • Other options: tick Regular expressions

Explanation: \D Match any character that is not a decimal digit.

Regards

Sorry, I wan not clear

In Starbasic, I have a string variable

dim s$
s = “A25”

So I would like to define a second variable
that contain a parte of the string “s”

dim s2$
s2 = “25”

Is there a function that allow to extrapolate “25” from the string “s”?
[so s2 = f (s)]

Thank you

s2 = Right( s, 2 ) REM take the last two characters of s.

or:

s2 = Mid( s, 2 )    REM take all characters from s, starting at the second character.