you use this twice and I'm not enough of a regexp wizard to understand what this does 

- maybe move this into a computed property (dependent on INSERT_PILL_CHAR)

also would be helpful for me (and probably others using this library) if you commented what this regexp matches. not sure why you are matching against the insert_pill_char