in reply to Re^5: How to convert a string with regex to a string with a fixed length?
in thread How to convert a string with regex to a string with a fixed length?

Obviously you have to remove the leading s of s/... then. If that still does not work, you can use a really ugly hack by making a regex for each possible string length:
/\b(\d)/${1}000000000000/ /\b(\d{2})/${1}00000000000/ /\b(\d{3})/${1}0000000000/ /\b(\d{4})/${1}000000000/ /\b(\d{5})/${1}00000000/ ...

That still assumes that the RHS is actually interpolated by your misterious program. If it's not, you could still try to work with look-behinds:

/(?<=\b\d)$/000000000000/ /(?<=\b\d{2})$/00000000000/ /(?<=\b\d{3})$/0000000000/ /(?<=\b\d{4})$/000000000/ /(?<=\b\d{5})$/00000000/ /(?<=\b\d{6})$/0000000/ ...

(not tested)