Matt's Roof Garden

Powered by 🌱Roam Garden

Cheatsheet/regex

for regex

Match Everything before (not including)

[^|]*

Match Everything after (not including)

(?<=\|).*$

Match 5 Characters after & including string

(?:\$).{5}
(?<=\/p>)(.*)(?=<p>)
(?<=<span)(.*)(?=span>)
<spanspan>
#\d{3}
NOT - ^(?!.*(BAD|WORDS))\b.*(GOOD).*\b.*(WORDS).*
\(.+?\)

Match between and including two strings (SUSPECT)
\b(\w*FIRST-STRING\w*)\b(?<=(FIRST-STRING))(.*)(?=SECOND-STRING)\b(\w*SECOND-STRING\w*)\b




[[Digital Garden]]
(?=::).*
(?<=::)(.*)
.+?(?=::)
((?<=\#)(\w+)|\#\[\[(.*?)\]\])
(?=).*(?=milk))