Skip to content

Instantly share code, notes, and snippets.

@jstejada
Created November 30, 2014 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstejada/ff767c28cae27851a0c3 to your computer and use it in GitHub Desktop.
Save jstejada/ff767c28cae27851a0c3 to your computer and use it in GitHub Desktop.
char map for accented chars
charMap:
'á': normal: 'a', regexp: new RegExp('[á]', 'gi')
'é': normal: 'e', regexp: new RegExp('[é]', 'gi')
'í': normal: 'i', regexp: new RegExp('[í]', 'gi')
'ó': normal: 'o', regexp: new RegExp('[ó]', 'gi')
'ú': normal: 'u', regexp: new RegExp('[ú]', 'gi')
'Á': normal: 'A', regexp: new RegExp('[Á]', 'gi')
'É': normal: 'E', regexp: new RegExp('[É]', 'gi')
'Í': normal: 'I', regexp: new RegExp('[Í]', 'gi')
'Ó': normal: 'O', regexp: new RegExp('[Ó]', 'gi')
'Ú': normal: 'U', regexp: new RegExp('[Ú]', 'gi')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment