Matching on digit characters in a text node and changing them to an attribute

F170

New Member
Illustration of my source doc:\[code\]<blockquote> <center> <h1>CHAPTER 100. RANDOM TEXT HERE </h1> </center> <center> <h1>CHAPTER 200. RANDOM TEXT HERE </h1> </center></blockquote>\[/code\]My desired output:\[code\]<title chapter="100"> CHAPTER 100. RULES OF SOMETHING TEXT HERE </title><title chapter="200"> CHAPTER 200. RULES OF SOMETHING TEXT HERE </title>\[/code\]Would I use regex here to help me match on the chapter #?Thanks in advance.
 
Back
Top