Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?<![\s\S\r])(.*)
/
gm
Input 1
1
New
# project1 I could have put any other inline tag or string there. This main body line could have been the very first line as well, if no tags exist. Change the keys after each `\n` and add or remove any more keys you want. In this example, I added the desired tag in the indented multi-line format favoured by Obsidian. As this is not a Templater solution, `date modified` is hard-coded here for the date you are making your changes. If not needed, it can be removed for the substitution part. If it is a first time doing regex changes, make a backup of vault or Diary folder.
Extraction