DEV Community


Posted on

How to write "four letter word" in regex?

Hi, I am writing a blog post and thinking of adding some humor (dunno if it will fly), but basically referencing the typical "taking the s**t our of x" and replacing the four letter word with regex.

Would this be clear, but also accurate (and bonus, even a little bit funny)?

Taking the /s[a-z]t{4}/ Out of CLAs

I wasn't sure whether I should use {d} or use the \b for boundary beginning and end.

Should it be more explicit and have it match where the first character is s and last is t?

Open to other suggestions!

Top comments (0)