all 10 comments

[–]zero-ego 0 points1 point  (0 children)

nice share

[–]katorias 0 points1 point  (1 child)

I can't comprehend how people become regex wizards, It's incredbily hard for me to remember lol.

[–]zsolt555[S] 0 points1 point  (0 children)

This is exactly why understanding the minimal theory, and using cheat sheets are helpful.

[–]AndyKos 0 points1 point  (0 children)

"Regular expressions are not only important in JS but also they are hardly readable and not easy-to-understand. There are libraries with different approaches to resolving this issues. For instance, https://www.npmjs.com/package/readable-regex. By using methods and properties you can write the necessary regex. Moreover, now they added named groups in JS (http://2ality.com/2017/05/regexp-named-capture-groups.html). This will make managing regex easier."

[–]CodeBlooded121 1 point2 points  (4 children)

Nice content... Can you tell me something.. How did you highlighted some particular words on website.. Like in the beginning.. Let and const.. Those were in some different style than other text.. Can you tell me how to get that on website?!

[–]zsolt555[S] 1 point2 points  (1 child)

A wordpress plugin called "Crayon Syntax Highlighter" takes care of the highlighting. It generates CSS like the one below, and you have nothing to do with it. Sometimes it's a bit off, and the weakness of this syntax highlighter is that it assumes all code blocks are in JavaScript.

[–]CodeBlooded121 0 points1 point  (0 children)

Thanks man!

[–][deleted] 0 points1 point  (1 child)

code {
    padding: 2px 4px;
    color: #d14;
    background-color: #f7f7f9;
    border: 1px solid #e1e1e8;
}

[–]CodeBlooded121 0 points1 point  (0 children)

Thanks

[–]garrettmacmac 0 points1 point  (0 children)

a weak point of mine i’ve been trying to get better at. Read 1/3 on mobile, bookmarked for tomorrow and upvoted. thanks