Article 59NRP [SOLVED] Help with regex

[SOLVED] Help with regex

by
fyrmest
from LinuxQuestions.org on (#59NRP)
Hello.

I have a series of strings formatted like this: <row-19> in an xml document. The numbering goes from 4 up to 996.

I would like to take the string above, grab the number in it, and transform it to the following format: <row id ="19">. My problem is how to grab the number in the original strings and drop it in the new string format.

As an alternative, I could replace the <row-19> format and do away with the word row entirely, and replace it with <item id ="n"> where n is an integer that is incremented by one.

I think this is easy for someone who knows how. As always. Is anyone willing/available to help?

Thanks.latest?d=yIl2AUoC8zA latest?i=UwWVDkRp514:X3dDQE6_eYY:F7zBnMy latest?i=UwWVDkRp514:X3dDQE6_eYY:V_sGLiP latest?d=qj6IDK7rITs latest?i=UwWVDkRp514:X3dDQE6_eYY:gIN9vFwUwWVDkRp514
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments