Consider this string:
apple banana carrot dessert carrot carrot apple banana banana carrot dessert dessert
I want to match and return everything starting from the last occurrence of "carrot" (whether it's itself included or not — let's say it should be), which would give:
carrot dessert dessert
This is the farthest I've gotten:
.+(carrot.+)$
I'm not sure how to return only Group 1 and not the entire Group 0 (which Group 1 is a part of). Clearly I'm misunderstanding some basic mechanics of regex. Thank you for reading.
I'm coding an AutoHotKey script.