Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gist for the best regex for escaping bad spellcheck suggestions in Groovy. Should be easily portable to JavaScript and Java, or just paste into groovysh.
import java.util.regex.Pattern;
// note that you won't need to escape the $ in Java
Pattern filterBadSpellcheckPattern = Pattern.compile("[:.,;!?\\)\\('\"\\-\u2026\u00AE\u00A9]\$")

This comment has been minimized.

Copy link

@skriewel skriewel commented Jan 24, 2013

also: \u00B3\u00BB\u2013\u2014\u2019\u201C\u201D\u2020\u2022

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