ericcornelissen/wordrow

Add functionality to escape prefix and suffix dashes

ericcornelissen opened this issue · 0 comments

Make it possible to actually match a word starting or ending in a hyphen and replace it by something else. This should be made possible by making it possible to escape the dash character.

Proposal

Escape a dash character with a forward slash as in:

foo\-, foobar

Which has the following effect:

- foo foo-
+ foo foobar

As a consequence forward slashed need to be escaped themselves as well:

foo\\bar, fooar

Which has the following effect:

- foo\bar
+ foobar