Converting string to HDL path

In reply to dave_59:

These path do not end with numbers,but end with diff string

Like
toop.rtl.wnn
toop.rtl.wne
toop.rtl.wnb
Is there any any way ?

Thanks