In reply to bhj78:
$rose(a) ##1 !a[->1]
Catches the last occurrence of a before another rose of a.
No assertion will predict another repeats of a.
You may need some support logic or other info to limit what you are searching for. Again, you have to define what “Last” means.
Ben