Regular Expressions are incredible, but they can also be incredibly terrifying. To make matters worse, you have probably heard that regular expressions are expensive and should be avoided. In this video, we are going to see how easy regular expressions can be, and we are going to see how they can be very quick as well.
Full Training Courses: https://www.DevForge.com
Source Code: https://www.DevForge.com/downloads/?c...
Mailing List: https://signup.iamtimcorey.com/
Regular Expressions are incredible, but they can also be incredibly terrifying. To make matters worse, you have probably heard that regular expressions are expensive and should be avoided. In this video, we are going to see how easy regular expressions can be, and we are going to see how they can be very quick as well.
Full Training Courses: https://www.DevForge.com
Source Code: https://www.DevForge.com/downloads/?c...
Mailing List: https://signup.iamtimcorey.com/
* ^ - Starts with
* $ - Ends with
* [] - Range
* () - Group
* . - Single character once
* + - Matches one or more occurrences of the preceding element.
* It requires at least one occurrence for a match.
* * - Matches zero or more occurrences of the preceding element.
* It can match zero occurrences, meaning the element is optional.
* ? - optional preceding character match
* ?= - Positive lookahead assertion. It is used to assert that a certain pattern can be
* matched ahead in the string without consuming any characters.
* This means it checks for the presence of a pattern but does not include it in the match.
* \ - escape character
* \n - New line
* \d - Digit
* \D - Non-digit
* \s - White space
* \S - non-white space
* \w - alphanumeric/underscore character (word chars)
* \W - non-word characters
* {x,y} - Repeat low (x) to high (y) (no "y" means at least x, no ",y" means exactly x)
* (x|y) - Alternative - x or y
* [^x] - Anything but x (where x is whatever character you want)
*/