Answer the question
In order to leave comments, you need to log in
How to remove duplicate occurrences at the end of a string using Regex in C#?
Very simple question, but I'm not strong in regular expressions.
There is a string s1 and you need to delete all occurrences of the substring s2 in it, if they are in a row from the end.
For example:
s1 = "qwertyuiop asdfghjkl zxcvbnm abc abc abc";
s2 = " abc";
// в результате должно пулучиться "qwertyuiop asdfghjkl zxcvbnm"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question