Well, the question is pretty simple. I am looking for a line like this:
name="some_text_0_some_text"
I have HTML code before and after the line above.
Now I would like to replace 0 with something like !NEW_ID!
So, I made a simple regex:
.*name="\w+(\d+)\w+".*
But I do not see how to replace an exclusively captured block.
Is there a way to replace the captured result, for example ($ 1), with some other line?
The result will be:
name="some_text_!NEW_ID!_some_text"
Thanks for your help :)
javascript regex
Nicolas Guillaume Oct. 17 '10 at 19:38 2010-10-17 19:38
source share