Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
maltesh
May 20, 2004

Uncle Ben: Still Dead.

Mr. Bubbles posted:

Could anyone help identify the issue in my regex usage?

The red in the if statements indicate that both if statements are false, but it seems that one should be true.



Thanks

If you're using regular expressions "*magic*" is not a valid pattern. The "*" in regex means 'Match 0 or more of the preceding expression, and "." is a wildcard for any character.

So in statement 5, if you want to keep using Regular Expressions you probably want to match on ".*magic.*" instead.

Or switch back to Tasker's Simple Matching, where "*magic*" will do what it looks like you want it to do.

Adbot
ADBOT LOVES YOU

maltesh
May 20, 2004

Uncle Ben: Still Dead.
All-lowercase variables are local, and only exist while the task is being run. So when you're not running that task, %text has no value stored in it, and this the if statements show false.

and when you are running that task, it's not doing anything that will show you what value %text had while it's running, and %text gets cleared after execution.

All-caps variables are global and retain their values after task execution.

  • Locked thread