I need to capture all (english) words except abbreviations whose pattern are:
"_any-word-symbols-including-dash."
(so there is underscore in the beginning and dot in the end an any letters and dash in the middle)
I tried smthing like this:
/\b([A-Za-z-^]+)\b[^\.]/g
but i seems that I don't understand how to work with negative matches.
UPDATE:
I need not just to match but wrap the words in some tags:
"a some words _abbr-abrr. a here" I should get:
<w>a</w> <w>some</w> <w>words</w> _abbr-abbr. <w>a</w> <w>here</w>
So I need to use replace with correct regex:
test.replace(/correct regex/, '<w>$1</w>')