Is there any way to remove arrays following a certain number?
For example, delete %array(100:)
So I came up with one of the new Tasker options: (use regex in any of the places where you could only use Tasker pattern matching)
In my case I wanted to delete all arrays greater than 99.
So I do the following:
A1: Clear Variable [Name: ~R%WH_Log\d\d\d Pattern Matching:ON Local Variables Only: Off]
This way I get all the% WH_Log arrays with more than two digits deleted.
I share it, in case it serves someone else, a greeting.
> The solution that Richi D has given, works perfectly in most cases, but in my case, when I separated the variable with "," it caused me errors, due to which some arrays contained "," and were sectioned.
Ahh, forgot about that.. :( It would be nice if we could define the splitter used when getting the data from the array with a %arr(). Maybe pent could make so we could do %arr()(|) so this would present the data like a|b|c|d
>
> So I came up with one of the new Tasker options: (use regex in any of the places where you could only use Tasker pattern matching)
>
Great idea..
> In my case I wanted to delete all arrays greater than 99.
I am not a regex guy but could you not also come up with a regex that would match all numbers greater then 99, or even any group of numbers like 24-48 ? For others interested in this.
Each \d is a digit, so the regular expression %Var\d\d\d will only match the arrays greater than 99. To match, it must be a three-digit array, and in no case will match With an array of one or two digits.