A Trichotomy for Regular Trail Queries (Logical Methods in Computer Science, 2023)