Skip to content

Conversation

@bethesque
Copy link
Contributor

The \w character class on Mac's version of sed (BSD) does not seem to be recognised as "all word characters".

echo "foo" | sed -E -e 's/\w*/_/'
_foo

I had to update my pattern to .* to get it to work correctly. I understand it's not as precise, but I couldn't find a character class that was acknowledged to work the same across all platforms.

@spacewander spacewander merged commit a0a32ab into tj:master Jun 23, 2020
@spacewander
Copy link
Collaborator

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants