Hi,
(I am using FME Desktop 2015.1)
Can anyone help with the regex needed to replace multiple consecutive occurrences
of a flag which I have created with a single instance; the flag may appear as a
multiple occurrence at many positions throughout the text. Each time I need to
replace the many instances with a single instance. Please see examples below.
Please note that as in the first flag grouping in example 1 it may or may not have
spaces either side of the grouping. At present the 'flag' is (TMP_flag) but if
this syntax (namely the parenthesis) cause an issue I can change them.
Example 1
I am text before(TMP_flag)(TMP_flag)I am text in the middle
(TMP_flag)(TMP_flag)(TMP_flag) I am text at the end(TMP_flag)
Becomes
I am text before(TMP_flag)I am text in the middle (TMP_flag) I am text at
the end(TMP_flag)
Example 2
(TMP_flag)
Becomes
(TMP_flag)
Example 3
(TMP_flag)(TMP_flag)(TMP_flag)
Becomes
(TMP_flag)
Example 4
Some more text(TMP_flag)(TMP_flag)
Becomes
Some more text(TMP_flag)
Thanks in advance,
Rob