Reputation: 2000
So I have a regex that matches well for any new word in a text box:
return string.substring(0, area.selectionStart).match(/[\wäöüÄÖÜß]+$/);
but I now want to match only when preceded by a '%' symbol, and I don't want to include the % in the match. This is the only condition I want to add everything else works exactly as it should.
I have tried just about everything I can find, but I think I am over complicating it with crazy regEx patterns...
Sincere thanks for any help. It is greatly appreciated.
Upvotes: 0
Views: 424