Email or username:

Password:

Forgot your password?
Top-level
Jens

@ivory You might want to rather use \b instead of (space), so you're also able to match hashtags and other non-alpha-numeric chars.

16 comments
Cedr\c :ivory_logo:

@ivory @daskaja How to include capital letters? "Elon" is not counted

Jens

@cedric @ivory \b[Ee][Ll][Oo][Nn]\b - not nice, but works

Jakub

@daskaja @cedric @ivory
To ignore case sensitive type:

(?i)\belon\b

xinit ☕

@cedric

Yeah, a /i would be a help, for sure. Maybe [Ee]lon would work? I don't subscribe, and regex is one of the sub-only features.

On a tangent, wouldn't it be nice to have search/replace option in addition to basic filtering? Imagine /elon/shitbird/gi as a global filter, @ivory @daskaja

[aware event]

@xinit @cedric @ivory @daskaja Try

(?i)\belon\b

But yeah, it should probably be in the UI.

xinit ☕

@Wevah

I'm out of regex practice, but the (?i) checks out on regex101.com

@cedric @ivory @daskaja

burgatshow

@daskaja @ivory also a /i flag to make it case insensitive. ;)

Jens

@burgatshow @ivory I wasn't sure if modifiers were supported here, since the GUI is a bit misleading. But if so, better use /i

burgatshow

@daskaja @ivory sure. You are right. It is more like a suggestion to @ivory to implement the switch for case sensitivity.

Aaron Mahler

@daskaja @ivory Seemed a good test question to pose to ChatGPT - which resulted in precisely your same \b recommendation along with a decent description of the reasoning. I did that before seeing your reply, so not saying it validated your answer - more the other way around. :)

Ryan Booker

@daskaja @ivory I think they're also case sensitive (at least they were?) so all mine are prefixed with (?i)…

dxzdb

@daskaja @ivory omg - am I finally going to have to learn regex because of a mastodon app! 😵🤣

Go Up