That is an option. In the calculation-microflow you can use
substring($yoururl, length($yoururl)-8, 8)
Mind the performance issue of calculated attributes. You can prevent them by storing the calculated attribute in a 1-1 associated helper-object, which causes the calculation to only get performed when the attribute is actually used.