This solution is outdated. To rescore this solution, sign in.
-
3 Comments
Sorry for resubmitting an old regexp solution. Seems, that previous one disappeared. I have to solve this problem the proper way.
I think that this solution is perfectly legitimate. Why try to solve it "properly"? It's not like you are using eval or something like that. regexprep is a perfectly legitimate tool to use.
I agree with your point of view. Regexprep is a powerful function here.
Unfortunately I've used also '(??@some_code)'. In this case, it's not as bad as playing 'size=11' solution, but it is still a kind of size-cheating for me. I used to play solutions like that, but now I try to avoid this.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!