Given the string s1, return the string s2 with the target characters removed.
For example, given
s1 = 'the main event'
your code would return
s2 = 'the event'
Note the 2 spaces between "main" and "event" Only the four letters in the word "main" were deleted.
Solution Stats
Problem Comments
8 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers2710
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15808 Solvers
-
Remove the small words from a list of words.
1566 Solvers
-
2530 Solvers
-
Reverse the Words (not letters) of a String
476 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
520 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
This problem is fantastic to improve his knowledge with regular expressions!
I have rescored the leading problem to make sure its not zero
I learned so much about the regexp and strjoin functions because of this problem. Thank you!
I agree... This problem improved my knowledge of regexp. Although my code is running well in my computer but not here. I'm using R2015a. Can anyone please help ! Thank you
Did it in two steps, so many functionality in regexp that I discovered for myself today.. )
nice problem..really nic
Interesting problem.
pretty tricky