Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add new chapter: replacing sub-strings #140
Conversation
|
Interesting alternative to RegExps. Most devs would lean to RegExps because it is familiar and expected. Insert comment about readability here. Nit PicksI think most of the code examples in this repo use double-quotes instead of single-quotes and they don't have spaces inside the parenthesis. |
|
okay I've made the changes suggested IMO this is simpler than RegExps because RegExps require you to escape certain characters. This is especially problematic if you are using a RegExp on a variable string, because certain characters need to be double escaped you're right it's less intuitive/readable. but at the other day, this is JavaScript. Other languages have this kind of thing built in |
|
|
Add new chapter: replacing sub-strings
As discussed, here's a new chapter