To my knowledge, you could not do this with regex alone, but it would be easy to do in any scripting language. (I'd use AppleScript, but only because I know it reasonably well, so it's my go-to language.) But it should be easy in Perl, Python, or any of the other likely options, as well.

Rick Gordon

---------------------
On 12/14/14 8:32 PM, Vlad Ghitulescu wrote:
I have the TOC well formatted :-) now and I’m searching for a regex to number each tutorial in every chapter.
My TOC looks like this now:

—

    1. What's New with Joomla! 3 Templates12m 9s
    Installing the starting state exercise files6m 17s
    Exploring template changes in Joomla! 32m 11s
    Discussing CSS and LESS3m 41s

    2. Creating the HTML Starting File33m 13s
    Reviewing the graphic designs3m 0s
    Understanding Joomla! template file structures5m 22s
    Configuring a Dreamweaver site and populating it with Bootstrap
    CSS9m 48s
    Building the grid10m 11s
    Adding the Google font2m 50s
    Adding a custom style sheet2m 2s

    (…)

—

and I would like to have it like this:

—

    1. What's New with Joomla! 3 Templates12m 9s
    1.01 Installing the starting state exercise files6m 17s
    1.02 Exploring template changes in Joomla! 32m 11s
    1.03 Discussing CSS and LESS3m 41s

    2. Creating the HTML Starting File33m 13s
    2.01 Reviewing the graphic designs3m 0s
    2.02 Understanding Joomla! template file structures5m 22s
    2.03 Configuring a Dreamweaver site and populating it with
    Bootstrap CSS9m 48s
    2.04 Building the grid10m 11s
    2.05 Adding the Google font2m 50s
    2.06 Adding a custom style sheet2m 2s

    (…)

—

Do you have any idea?

___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com

--
This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to