I want to replace the asterisks in a Markdown list with hyphens.
Example:
- 1.0
- 1.1
- 1.2
- 2
- 2.1
- 2.2
Currently I have a separate regex pattern for up to three levels of indentation set up in Keyboard Maestro for Mac:
I wonder if there isn't a smarter way to do this and which adresses all kinds of indentation.
You can use submatching groups and reference them in the replacing string like this:
Regular expression matching your lines with list items: ([\t ]*)\*(.*)
The string used for replacement: \1-\2