Please tell me if it is possible to make a search for all identical words through rejax and insert a dash between them until such a word is no longer the next in the sentence.
Example here: https://regex101.com/r/1GQiQ8/2
My regex:
(\blong\b|\banyword\b)(-| )(\blong\b|\banyword\b)
Sample text:
test text long long test text
test text long long long long long long test text
test text long long test test long long long test text
How it should be:
test text long-long-long-long-long-long test text
test text long-long test test long-long-long test text
How does it work now:
test text long-long test text
test text long-long long-long long-long test text
test text long-long test test long-long long test text