question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mentionPattern does not match names that end in `-`

See original GitHub issue

People who’s names end in - can’t be pinged. img

After messing around a bit, I think this is due to the \b word boundary matching. As - is not a word character, a space can never match after it (word boundary requires word before and non-word after, or vice versa). You can still ping these people if you put a letter directly after the - in order to trigger the word boundary matching.

Pattern p = Pattern.compile("\\b(" + "Box-" + ")\\b", CASE_INSENSITIVE);
Matcher m = p.matcher("I'm Box-");

System.out.println(m.find());
// Prints "false"

Matcher m2 = p.matcher("I'm Box-x");
System.out.println(m2.find());
// Prints "true"

Wanna have the bug fixed quickly? Visit Issue hunt… Issue hunt

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Sheikah45commented, Jun 12, 2021

I think I was able to fix it

0reactions
Sheikah45commented, Jun 12, 2021

@Askaholic this pattern matches on just spaces as did @1-alex98. So this is not trivial it seems

Read more comments on GitHub >

github_iconTop Results From Across the Web

docs incorrectly mention pattern matching works like ...
the docs and explain that pathname matching is not possible in bash, i.e. there is no ... i.e. "ls", would NOT match that...
Read more >
Regex to not Match Names - Stack Overflow
So my forum allows me to use a regex to allow certain user names registration, but I want to do that ...
Read more >
Comparing a list with names that not match
Hello, I need to compare data from 2 sheets (highlighted in blue) with the following challenges: List 1 contains who got access to...
Read more >
300 Popular Boy and Girl Baby Names Ending in A, N, and Y
Find the perfect name ending in A, N, or Y for your baby girl or boy. Some of the most popular will fit...
Read more >
How to Fix: names do not match previous names in R
In this article, we are going to solve the error “names do not match previous names” in R Programming Language.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found