[SOLVED] Two JavaScript newbie questions for article filtering (whole words / case-sensitivity) #1264
-
Hello friends, I hope you can help me out with these questions.
Thanks for your time. |
Beta Was this translation helpful? Give feedback.
Answered by
martinrotter
Jan 4, 2024
Replies: 1 comment 2 replies
-
Hi.
const regex = /\bXXYY\b/i;
function filterMessage() {
if (regex.test(msg.title)) {
// matched!!!
}
return MessageObject.Accept;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
PMTabs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.