I'm software developer working to solve problems and create robots to solve problems and create robots to solve problems and create robots to... yeah I really love recursion...
Though that regexp may not be faster (in terms of performance, compared with creating own loops and conditions), regexp is more efficient to use for comparing (using str.match() etc.) and extracting parts of strings (thanks to capture groups / {}). I also recommend learning regex as it can be used outside JavaScript such as PHP, Java, Swift, and even Python.
I actually never thought of using regexp even in python to comparing, before reading about example in this article. Though they are not an easy thing to master, I agree that it's a useful thing in many ways!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well, now I know that regexp works faster! Thank you :) And I wish you strength to continue your dev path, it gets better and much more interesting.
Though that regexp may not be faster (in terms of performance, compared with creating own loops and conditions), regexp is more efficient to use for comparing (using
str.match()
etc.) and extracting parts of strings (thanks to capture groups /{}
). I also recommend learning regex as it can be used outside JavaScript such as PHP, Java, Swift, and even Python.I actually never thought of using regexp even in python to comparing, before reading about example in this article. Though they are not an easy thing to master, I agree that it's a useful thing in many ways!