RegEx: How can I replace with $n instances of a string? -


I am trying to change the number of form 4.2098234e-3 with 00042098234. I can capture component parts properly:

  (-?) (\ D +). (\ D) + E - ($ d +)  

But I do not know how

Any thoughts?

Thank you in advance, Ross

Ideally, I want to be able to do this with changing the facility / Finding TextMate, if for any result. I appreciate that for this problem there are better tools than RegEx, but this is still an interesting question (me).

itemprop = "text">

You can not make it purely in regular expressions, because the replacement string is only one with the background String is - you can not use iterations there.

In most programming lnaguages, you have the regex callback, which will be able to do this. Although it is not something that a text editor can do (unless it has some scripting support).


Comments