You need to enclose the chapter number variable in parentheses. (I used \d+ because it searches for numbers.) Try:
Find:
Code:
<p class="heading">(\d+)</p>\n\n <p>
Replace:
Code:
<p class="heading">\1</p>\n\n <p class="newscene2">
BTW, since it's a heading, I'd recommend enclosing it in heading tags, which will allow you to automatically generate a TOC in Sigil. You could also combine both headings. For example:
Find:
Code:
<p class="heading">(\d+)</p>\n\n <p>(.*?)</p>
Replace:
Code:
<h3 class="heading" title="\1 – \2">\1<br /><span class="newscene2">\2</span></h3>
Note: The above regex should work in
Sigil 0.53 because it automatically adds two spaces and a line break between the two paragraphs. If you use a regular text editor, simply delete the spaces and the line-break characters (\n) in the regexes.