filmov
tv
RegEx Tutorial: Learn Regular Expressions - Full beginners course 2022
Показать описание
We talk about Regex, or regular expressions, which is a way to define a specific format in a string. We use it to validate user input via JavaScript to increase the user experience (UX) and in PHP to increase security.
We cover a couple of pitfalls:
- Since you’re looking for matches, you can sometimes get a false negative
- Testing regex in the frontend is not a security measure at all, but it can be helpful
- The HTML Pattern Attribute helps a bit, but often confuse more than it helps.
We work with RegEx directly in HTML vi the Pattern attribute, in JavaScript and in PHP vi preg_match.
#RegEx #JavaScript #HTML #Pattern #PHP #preg_match #.test
We cover a couple of pitfalls:
- Since you’re looking for matches, you can sometimes get a false negative
- Testing regex in the frontend is not a security measure at all, but it can be helpful
- The HTML Pattern Attribute helps a bit, but often confuse more than it helps.
We work with RegEx directly in HTML vi the Pattern attribute, in JavaScript and in PHP vi preg_match.
#RegEx #JavaScript #HTML #Pattern #PHP #preg_match #.test