AutoCat simple(?) regex not working

Could be missing something obvious here. I added a “Description Regex” column to the “AutoCat” sheet. Then I added a simple regex: Zelle.*Stephen Smith
the idea is to capture the Zelle transactions to Stephen Smith where the description contains various gobbledygook between the word Zelle and the name of the recipient. But running AutoCat on everything comes up with no transactions updated. I have referenced this thread, and using the script idea there, I verified that google thinks the regex does match (for example):
Zelle Transfer Conf# 0gdrc1050;, Stephen Smith

I searched my AutoCat sheet for any other rules that might include some of these terms and therefore be processed first, but no dice. It’s the first time I’ve used the regex feature so I could have some fundamental misunderstanding. Any ideas?

Edit: I later added a very similar regex to categorize my property tax payments:
Preauthorized Debit.*Brookline
This one works fine. I can’t see any conceptual difference between the two. It is possible that the difference is that in this latter case there were no transactions where there was anything other than a single blank space being captured by the regex “.*” (In other words, I didn’t actually need a regex at all).

Edit2: Yup, if I create a description Preauthorized Debit foobar Brookline, it does not get caught by AutoCat with a regex of Preauthorized Debit.*Brookline.

I think the regex would be:
^Zelle.*Stephen Smith$

The ^ says ‘starts with’, the $ says ‘end with’ and the * says ‘anything here’. I tried it at regex101: build, test, and debug regex and it seemed to work with your example text.

Thanks, but I think that just excludes matches where the description doesn’t start with and end with the characters in question. I don’t think that’s necessary unless there are cases which don’t start and end as shown, and you want to exclude those cases. As it happens, I have no such cases anyway. I gave it a try nonetheless, no change.

I have a very similar regex in use for my auto loan payments.

^Online Payment .* to Auto Loan

Note the explicitly defined spaces. This regex requires the transaction description to:

  1. Start with the character string “Online Payment

  2. Followed by zero or (*) more characters (.)

  3. Followed by the character string “ to Auto Loan

  4. Any or no text may follow and still return a match as I do not have an end of string ($) boundary specified

The following description results in a match:
Online Payment x0822 to Auto Loan 5703 12/31

Your regex should work as defined. Are the transactions you are expecting to update already categorized? AutoCat will skip over transactions that have already been categorized by default. I would recommend removing the categorization of a single transaction for testing purposes.

Thanks for the reply. I had turned on the setting in AutoCat which runs on all the transactions, even if already categorized, and I’ve verified that’s working. To be sure, I also tried removing the category for one of the cases I’m trying to catch, but it still didn’t work.

You mention the explicitly defined spaces. My understanding is that .* should capture any character (the .) and any number of them, even none (the *). This may not be efficient, but it should work I think.

Yes,.* would capture all spaces or no spaces equally well. I was specifically calling out the spaces in my own regex string.

So we’ve ruled out AutoCat skipping transactions due to them being categorized. Do you happen to have any other criteria defined for that AutoCat rule aside from the regex that may be preventing a match? Maybe even just a stray character or invisible control character in any of the other columns for that row of the AutoCat sheet (or even in the Description Regex column header)? To rule out anything like that you could try creating a new rule using the AutoCat Advanced Rule Builder rather than manually creating the rule on your AutoCat sheet.

1 Like

I had already inspected the rules carefully, but it was a good idea to try using the rule builder rather than doing it manually. It produced a rule which looked identical at first, but when I scrolled over I noticed it had inserted its own “Description Regex” column at the end, so now there were two! (I had inserted mine manually much earlier). It had also added the regex to BOTH columns. Here’s where it gets fuzzy because I am not sure of what I did next. I had closed the extension with AutoCat in it, so I loaded it again, and ran with both columns in place (just for fun) but nothing changed. I then removed the first column. Only then did I realize that when I ran it with both, I may not have remembered to switch on the AutoCat “run on all transactions rule” when I reloaded the extension. I’m really not sure. All I know is that when I ran it with the single column and the “all transactions” rule on, it worked. If I have some time tomorrow I may restore the version with the two columns and try it. Obviously it’s not that I want to have the duplicate columns, but yes, I was a software engineer before I retired, and it’s bugging me that I can’t describe the bug precisely. Either there was some stray invisible character in the column header, or you have to have the regex column in a particular position on the AutoCat sheet.

Thanks for the idea!

1 Like

I’m glad to hear it worked!

I totally understand your desire to understand exactly why it wasn’t working previously. I’d love to hear what you find out. :grinning:

Yes, in particular, if there was something wrong with the title of my manual “Description Regex” column, it’s odd that the rule builder nevertheless put the regex in it. And, conversely, if there was nothing wrong with the title of the manual column, it’s odd that the rule builder felt compelled to make its own column! I’ll let you know if I figure out anything further. But I’m glad it’s working - I have many potential uses.

1 Like