I would like to create a text factory to change each instance of 

# This is a level 1 heading
to
This is a level 1 heading
=========================

And I would like to change each instance of

## This is a level 2 heading
to 
This is a level 2 heading
-------------------------

My grep skills are rudimentary. I’m using this.

Find: ^## ([A-Za-z: ,]+)\r
Replace: \1\r----------

It works as desired, almost. But instead of ten hardcoded dashes, I would 
like for the number of dashes to equal the number of characters in the 
previous line (once the initial hashmarks are removed). I’m in over my 
head. Can someone help?

Thanks.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or believe that the application isn't working correctly, please email 
"supp...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: 
<https://mastodon.social/@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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/6d9db3a1-d170-4dda-a08c-ee737300b966n%40googlegroups.com.

Reply via email to