Since the first action of your Macro failed due to bug, I did not look further.
However, there may be some work-arounds, like this:
Example Output
MACRO: Replace Start of Line Using For Each [Example]
**Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/f/f/ff45f1226bf7c30db6ffb3ded1a8dbf4f17f16e0.kmmacros"> Replace Start of Line Using For Each [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
<img src="/uploads/default/original/3X/1/3/13742fdca38fb71024c24cc2ad4793878f5ee5cb.png" width="568" height="1166">
Update: It is NOT the bug I first reported. The problem you are seeing is because the Search and Replace "Replace with" field, in your macro, actually has two lines in it:
So, starting from the beginning, using the source text from your regex101: build, test, and debug regex post, I have found the following macro to do generally what you are asking for. However, the text in the final result image you posted does NOT match the source text. So, I'm not sure exactly what you want. But this should at least get you started.
Be careful to NOT paste text into the Search and Replace Action. Be sure to just type it in.
**Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/5/5/55da68bf1a074bc3ba3cd6542bf6bbb0e3d22eac.kmmacros">Convert Markdown to HTML [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
### RegEx Details
* Step 1: https://regex101.com/r/nMlxiS/3
* Step 3: https://regex101.com/r/S4NkNh/1/
---
<img src="/uploads/default/original/3X/c/a/ca99021a1f02b807729290a4f0bdb24e7a1b96d5.png" width="555" height="1473">
---
### Notes:
The second Replace
![image|522x229](upload://pxy93L9Q06n6JhQOSYmSfsSiPUM.png)
is there to replace TAB and other characters in this substring:
```
har Oslo opplevd
```
with one SPACE.