Remove Accents

Remove diacritical marks and accents from Unicode characters, converting them to their ASCII equivalents.

Code

General
str.unicode_normalize(:nfd).gsub(/\p{Mn}/, '')

Parameters

The string to normalize

Server

More Ruby Snippets