Community Patterns

Community Library Entry

1

Regular Expression
Created·2017-02-14 08:06
Flavor·ECMAScript (JavaScript)

/
\b(^|[a-z0-9\-\—]+)(\s?)(\'|||\’)(\s?)((s|d|ll|nt|(t(is?|s?){1,2}){1,3}|((r|v){1}(e?){1}){1,2})\b)
/
gi
Open regex in editor

Description

This is function matching apostrophe via regex and JavaScript. Also find broken apostrophe and match whole word.

Submitted by Ivijan-Stefan Stipic <creativform@gmail.com>