Dec-15-2016, 05:10 AM
I think a regular expression is the way to go, if you're looking for simplicity. A regex will also have the advantage of performance, having been optimized in C, and efficiency, doing the minimum string traversal and not needing to create intermediate strings.