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
I think i should learn regular expression
Hi all, I just can't find out why the assertion fails. All works well on my MALTAB but not here. Both codes (commented and not) remove only the words which end with 'ain' and leave the two spaces but still the assertions here has failed.
This passes in R2017b, yet fails here. Why?
Actually this code won't pass the Test Suite on any version of MATLAB. The misunderstanding is caused by rendering of HTML text on Cody, which means that double-spaces are not _displayed_ in the Test Suite's solutions; nevertheless, the correct solutions do contain double spaces, as you can confirm by viewing the HTML source, and as also explained in the problem statement. Your code is removing some spaces. I'm sure you can fix it now, with this knowledge.
Thanks for clarifying. I appreciate it.
Probably not what i was supposed to do, but hey it works.
I think something is broken, I passed it the s2 given in the test suite and the assertion still fails.
Took me nearly one hour to solve (though not complete,for just "ain,it is wrong).But I think it's great.I recently learn regular expressions.
regexprep(s1, '(\w*)ain', '')
not working pls help me
Hi harish, so the if you see the regexprep documentation, it will tell you when you execute, it will remove every word which contains the letters ain in the expression. You can verify this on your system. To solve this, you need to look for a way to use regexprep such that it only looks for the letters in the end of the word.
I have to admit that this solution is not general
Get the area codes from a list of phone numbers
Set the array elements whose value is 13 to 0
Create incrementing array
02 - Vector Variables 1
Beginner's Problem - Squaring
Who Has the Most Change?
Implement a ROT13 cipher
Which values occur exactly three times?
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office