0

i am trying to replace some string pattern in a string, but I cant archive my goal..

input:

:randomword: NO REMOVE :random_word_word:
:random: NO REMOVE :random:
NO REMOVE :random:
:random: NO REMOVE

expected:

NO REMOVE
NO REMOVE
NO REMOVE
NO REMOVE

actual

''
''
'NO REMOVE'
'NO REMOVE'

current regex

Regex.Replace(input, ":.+:", "");
StackPHPcRoW
  • 61
  • 1
  • 4

0 Answers0