Hi team,
kindly help me out.
I have input string of Medicare Medicare
I would like to add hyphen (- ) like Medicare - Medicare
I tried the below syntax
System.Text.RegularExpressions.Regex.Replace(Ins1Sentence,FirstOccurrence,"- "+FirstOccurrence)
Got the Output like - Medicare - Medicare
Can anyone help me out to get the exact output like Medicare - Medicare
Thanks In Advance
Yoichi
(Yoichi)
2
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Replace(Ins1Sentence,"(?<="+FirstOccurrence+")\s+(?="+FirstOccurrence+")"," - ")
Regards,
vrdabberu
(Varunraj Dabberu)
3
Hi @manikandan.murugan
Try this:
Input: "Medicare Medicare"
Output: Input.Replace(" "," - ")
Regards,
Hi Yoichi,
Its working and thanks. My question may be Incorrect
In the below pattern, its not splitting with the -
BCBS BLUE ESSENTIALS BLUE ESSENTIALS NETWORK HIX BCBS

I would like to get the output mentioned below
BCBS BLUE ESSENTIALS - BLUE ESSENTIALS NETWORK HIX BCBS
Can you please help me…
Thanks in Advance
vrdabberu
(Varunraj Dabberu)
5
Hi @manikandan.murugan
If possible could you share input text and output text.
Regards
Yoichi
(Yoichi)
6
Hi,
If we set FirstOccurrence “BLUE ESSENTIALS”, it works as the following. Isn’t this what you expect?
Regards,
yes This is I expect exactly, But for me its not working
Yoichi
(Yoichi)
8
Hi,
Probably, exact string is necessary. Can you share your input as text file? It’s no problem if dummy data.
Regards,
Hi Yoichi,
here I have attached the sample Input file
Thanks in Advance
Input.txt (525 Bytes)
Yoichi
(Yoichi)
10
Hi,
How do we get FirstOccurrence? Can we set it manually in advance, or using some method?
Regards,
Yoichi
(Yoichi)
12
In my environment. it works well as the following.
Sequence2.xaml (6.9 KB)
1 Like
Yoichi
(Yoichi)
14
Oh, sorry, backslash is displayed as yen sign in my Japanese environment.
Please use backslash like the first expression.
System.Text.RegularExpressions.Regex.Replace(Ins1Sentence,"(?<="+FirstOccurrence+")\s+(?="+FirstOccurrence+")"," - ")
Regards,
1 Like
Thanks Yoichi and Its working now. Its a good solution
1 Like
vrdabberu
(Varunraj Dabberu)
16
Hi @manikandan.murugan
You can try this way. This will work for all the inputs you have. Check out the workflow file.
Sequence4.xaml (12.9 KB)
Output:

Regards
system
(system)
Closed
17
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.