DEV Community

timfong888
timfong888

Posted on

3 1

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)

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up