Math expression at set variable

Hi.

I guess that is a very basic doubt but I am not able to replicate this WIKI instruction about math expressions. (See attachment)

The EXPRESSION option is not at blue rectangle.

May someone clarify?
 

Attachments

  • Screenshot_20240410_095333_MacroDroid.jpg
    Screenshot_20240410_095333_MacroDroid.jpg
    479.6 KB · Views: 5

hsurB

Well-known member
You can use text manipulation action to save only numbers from string variable into another variable

Use extract: source: your string variable
Regex: \d Full match
Save it into the same variable

And then set variable action(second variable - integer) to the value of your string variable after text manipulation
 
Last edited:
You can use text manipulation action to save only numbers from string variable into another variable

Use extract: source: your string variable
Regex: \d Full match
Save it into the same variable

And then set variable action(second variable - integer) to the value of your string variable after text manipulation
Understood.

Thanks a lot
 

Endercraft

Moderator (& bug finder :D)
You can use text manipulation action to save only numbers from string variable into another variable

Use extract: source: your string variable
Regex: \d Full match
Save it into the same variable

And then set variable action(second variable - integer) to the value of your string variable after text manipulation
The strval magic text works too.
 

Dm114

Well-known member
It worked fine. Thanks.

Now I will deal with setting a date to midnight, in order to have the same timestamp.

Life is hard. Rsrsrs
You even must not use "strval" function and you can Set My_integer_variable={lv=My_string_variable} if My_string_variable contains either a numeric value or a math expression (even with functions)
 
Top