I am trying to find, and remove, a specific pattern inside a string with C#.
The pattern is an asterisk, followed by any number of numbers, followed by .txt
Example strings:
- test*123.txt
- test2*1.txt
- test*1234.txt3
- test4*12.txt123
Given these examples, the desired results would be:
- test ("*123.txt" was removed)
- test2 ("*1.txt" was removed)
- test3 ("*1234.txt" was removed)
- test4123 ("*12.txt" was removed)
How can this be accomplished?