filmov
tv
Regular Expression OR Operator and Operator Precedence (aka the Alternation Operator)
![preview_player](https://i.ytimg.com/vi/lkI9qQ9nxjI/maxresdefault.jpg)
Показать описание
The OR operator allows you to compose regular expression patterns to match any one out of a set of alternative choices. The OR operator's precedence is lower than the AND THEN operator's. Using parenthesis to control the order of operations in a regular expression pattern, just like you do in algebraic expressions, is commonly useful when writing regular expressions that involve the OR operator. The OR operator is more technically referred to as the alternation or union operator.
A Mysterious, Little Course on Regular Expressions
This is the second video in "A Mysterious, Little Course on Regular Expressions", a short introductory course on applied regular expressions. The first video introduced the AND THEN (concatenation) operator and gave instructions for setting up your computer with Visual Studio Code and the course's project repository with the same files used in the video.
Instructions for Following Along:
2. In VSCode, Go to View, then Command Palette, type Git: Clone and press enter
4. Select the Folder/Directory you would like to save the project, press ok. Open the project.
5. In the Files Explorer Pane in VS Code, you should now see the three .txt files we're using in the videos:
About me: Hey, hey! I'm Kris Jordan (he/him/his), a professor who teaches computer science at the University of North Carolina at Chapel Hill. Back when I first tried to learn regular expressions it felt like a lot of weird, cryptic incantations to memorize. I couldn't separate the essential concepts to understand from the merely convenient shorthand add-ons. When I was was taught their theoretical basis, I struggled to connect academic notation and abstract examples with real-world syntax and concrete applications. So I'm teaching this for you the way I wish regular expressions were introduced to me: fundamentals-first with the syntax of modern applications in an actively hands-on, follow-along style.
If you enjoy learning, or being refreshed on, useful applications of fundamental ideas in computer science, data science, and software engineering, I encourage you to Subscribe to my channel so you can follow along as new lessons are added on a variety of subjects you'll find valuable!
A Mysterious, Little Course on Regular Expressions
This is the second video in "A Mysterious, Little Course on Regular Expressions", a short introductory course on applied regular expressions. The first video introduced the AND THEN (concatenation) operator and gave instructions for setting up your computer with Visual Studio Code and the course's project repository with the same files used in the video.
Instructions for Following Along:
2. In VSCode, Go to View, then Command Palette, type Git: Clone and press enter
4. Select the Folder/Directory you would like to save the project, press ok. Open the project.
5. In the Files Explorer Pane in VS Code, you should now see the three .txt files we're using in the videos:
About me: Hey, hey! I'm Kris Jordan (he/him/his), a professor who teaches computer science at the University of North Carolina at Chapel Hill. Back when I first tried to learn regular expressions it felt like a lot of weird, cryptic incantations to memorize. I couldn't separate the essential concepts to understand from the merely convenient shorthand add-ons. When I was was taught their theoretical basis, I struggled to connect academic notation and abstract examples with real-world syntax and concrete applications. So I'm teaching this for you the way I wish regular expressions were introduced to me: fundamentals-first with the syntax of modern applications in an actively hands-on, follow-along style.
If you enjoy learning, or being refreshed on, useful applications of fundamental ideas in computer science, data science, and software engineering, I encourage you to Subscribe to my channel so you can follow along as new lessons are added on a variety of subjects you'll find valuable!
Комментарии