Skip to content

Conversation

@Data-Meister
Copy link
Contributor

As discussed, here's a new chapter

@sukima
Copy link
Contributor

sukima commented Jan 29, 2016

Interesting alternative to RegExps. Most devs would lean to RegExps because it is familiar and expected. Insert comment about readability here.

Nit Picks

I 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.

@Data-Meister
Copy link
Contributor Author

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

@sukima
Copy link
Contributor

sukima commented Feb 10, 2016

:shipit:

sukima added a commit that referenced this pull request Feb 10, 2016
Add new chapter: replacing sub-strings
@sukima sukima merged commit 4f1223a into coffeescript-cookbook:master Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants