Try this:
a[id*='Some:Same'][id$='name']
This will get you all a
elements with id containing
Some:Same
and have the id ending in
name
Try this:
a[id*='Some:Same'][id$='name']
This will get you all a
elements with id containing
Some:Same
and have the id ending in
name