Need help with the regex code

17 views
Skip to first unread message

tboooe

unread,
Oct 19, 2017, 8:06:13 PM10/19/17
to Tasker
I am trying to just show the account balance from a text I get from my bank using the Variable Search and Replace function

The text is:

$111.11 Avail Bal
For Account activity: Reply ACT or LAS
For commands list COM

The regex code I am using is \$[0-9,]+\.[0-9]+

When I test this on regex101.com it works and only shows the number $111.11. However, in Tasker I am getting $111.11 Avail Bal

I've also tried \$[0-9,]+\.[0-9]{2} with the same results.

Any help would be appreciated.

tboooe

unread,
Oct 19, 2017, 9:35:56 PM10/19/17
to Tasker
Sorry, I meant to write that my regex won't match anything though the expression seems to work on regex101.com

Simon

unread,
Oct 20, 2017, 7:30:49 AM10/20/17
to Tasker
Your first regex works fine in tasker.

I believe the problem is with how you're dealing with the result variable. The result variable is actually an array, so for example, if your result variable is called %result, then you could add the flash action to flash either %result1 or %result(1).

The flash action is to prove that this is actually working.

Let me know if that works.


On Friday, 20 October 2017 02:35:56 UTC+1, tboooe wrote:

tboooe

unread,
Oct 20, 2017, 8:45:25 PM10/20/17
to Tasker
Thank you Simon!  That was the issue with the variable I was using in my notification.  Thank you very much!

Simon

unread,
Oct 21, 2017, 4:44:38 PM10/21/17
to Tasker
No worries, glad it worked.
Reply all
Reply to author
Forward
0 new messages