In reply to nex:
There’s no way within SystemVerilog to iterate over any set of characters embedded in an identifier name. Note that after synthesis flattens and optimizes, it is possible that not all the consecutive names exist. So you are left with doing this manually in a text editor, or some other script to generate the code.