Thanks Allan.
The code works perfectly! I've tried to insert a variable inside...
<${1:ul}> ${TM_SELECTED_TEXT/(.+)(?:\n(.+))?/ <li class="${3:odd}">$1</li>(?2: \n <li>$2</li>)/g} </$1>
...and this is the result...
<ul> <li class="${3:odd}">dfadfadfadfadfad</li> <li>fadfadfadfdaf</li> <li class="${3:odd}">afdfadfdafd</li> </ul>
How can we adjust the class to be the next tab stop with a default? I also adjusted your code to allow for a clean indentation of the li elsments.
Thanks for the help. :)