I want to check if a string has the format of a numbered list to format this lines correctly:
1. Something
Text
1.1. Anything
Text
Should get
<h2>1. Something</h2>
Text
<h3>1.1. Anything</h3>
Text
And so on...
I tried something like this for a preg_match:
#([\d]*\.)*\s*\K(.+?)$#s