Hi everyone,
I’m trying to use regex to trim a string coming from a Notion database item. This is a tweet title that has between 0-3 tags at the end. I got the regex working at regex101.com, which you can see here: regex101.com here is expression
^(?:(?:.*?#.*?)?((?:(?!\s#)[\s\S]){0,280}))
The requirement I wanted to implement was if the 280 limit intersects a hashtag, I want the entire hashtag removed.
I tried the following string:
Hey there, Twitterverse! We’re Wise Leaf AI, and we’re bringing cutting-edge AI to the healthcare industry. Follow us for exciting updates on our innovative solutions for practitioners. This tweet is longer by a number of chars than 280 #AIforHerbalists #WiseLeafAI #InnovativeSolutions
On regex101.com it worked and returned:
Hey there, Twitterverse! We’re Wise Leaf AI, and we’re bringing cutting-edge AI to the healthcare industry. Follow us for exciting updates on our innovative solutions for practitioners. This tweet is longer by a number of chars than 280 #AIforHerbalists
But when I try the expression in the Text Parser module, it doesn’t seem to be working the same.
Any suggestions?
Thanks kindly!