I’m having trouble getting this regex to work in Drafts
Example heading in draft
# 🧭 Project Name
I’m trying set a variable dependent on the presence of the draft beginning with "# " followed by one of these emoji
I’m using this to try to capture the emoji and whatever text follows it on the first line:
This worked in browser
/# ([\u{1F9ED}\u{1F4E6}\u{1F525}\u{1F680}\u{1F4C6}] .*)/
but Drafts doesn’t match the unicode emoji.
I also tried this notation but that didn’t work either
/# ((\u1F9ED|\u1F4E6|\u1F525|\u1F680|\u1F4C6) .*)/
Additionally, I’m having trouble with the backreference — I want $1 only — but when I do get it to match it returns the entire matched string followed by a period and the capture group like this:
# 🧭 Project Name.🧭 Project Name
What am I doing wrong?