this post was submitted on 28 Oct 2023
14 points (93.8% liked)

JavaScript

1989 readers
1 users here now

founded 1 year ago
MODERATORS
 

Hello!

I am pleased to announce a new version of my Understanding JavaScript RegExp ebook. This book will help you learn JavaScript Regular Expressions step-by-step from beginner to advanced levels with hundreds of examples and exercises.

Links:

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

Happy learning :)

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago (2 children)

Is calling Regex "Regexp" a Javascript thing or am I missing something?

[–] [email protected] 4 points 1 year ago

It's the name of the constructor, for example:

const pat1 = new RegExp(`42//?5`)

So, I used that in the book name.

[–] [email protected] 3 points 1 year ago

They're both alternate spellings of the same thing. Yes JS/ES/Ruby and a few other languages use "RegExp" in their standard libraries. Henry Spencer referred to one of his regex libraries as "regexp" as far back as 1986. I prefer regex because that's what I learned first, and it's easier to say "regexes" when you want to pluralize it, but I've seen both forms pop up over the years.

/regexp?/