I have a large line where there may be specific words (text followed by one colon, for example "test:"), occurring more than once. For example, for example:
word: TEST: word: TEST: TEST:
the βwordβ occurs twice, and the βTESTβ occurs three times, but the sum may be variable. In addition, these words should not be in the same order, and there may be more text in the same line as the word (as shown in the last example "TEST"). What I need to do is add an event number to each word, for example, the output line should be like this:
word_ONE: TEST_ONE: word_TWO: TEST_TWO: TEST_THREE:
RegEx to get these words that I wrote, ^\b[A-Za-z0-9_]{4,}\b: However, I do not know how to quickly complete the above. Any ideas?
source share