

JavaScript takes yet another approach. It doesn’t have an equivalent of the
Character.isWhitespace()method, but we can use the\scharacter class in a regular expression
\s might be the most obvious whitespace test, but the expectations are a bit more ambiguous when it comes to regex. Every regex runtime is different, so without looking it up, you’re going to end up with behavior you might not expect.
Instead, if you want to match Unicode whitespace, you should use \p{White_Space} in Unicode-aware mode (u or v flag).
I haven’t looked through any other runtimes, but something tells me the inconsistencies won’t stop at these three.
According to the docs, Rust’s char::is_whitespace checks if the value has the White_Space property, and regex does the same in Unicode mode (which is the default).

At work? Do what they want you to do I guess. If they are mandating you mass produce slop, do exactly that. I’ve tried fighting against it. There’s nothing you can do when your coworker opens a 785 file PR (not an exaggeration) and it needs to be reviewed today. Your carefully crafted code can never keep up with the constant waterfall of whatever the fuck Claude/ChatGPT/whatever calls acceptable these days.
Your best bet at work is to direct the agents others will use. Use a strict linter. Mandate a strict formatter. Add to the instructions that tests must be written and must pass. Do what you can to force it to emit semi-acceptable code (or fail if it can’t).
Outside of work? What’s a coding agent?