Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In the last movie, we saw how regular expressions spread to a number of different languages. While most of them are attempting to offer Perl-compatible regular expressions, in reality they're all slightly different, and that makes sense. I mean each one was written by somebody different and has slightly different specifications, and sometimes the differences can be very subtle. Each implementation, or version, of the regex processor can be referred to as an engine. You may also here me call them flavors, because each engine is slightly different as if it comes in a different. Let's take a look at some of the most popular ones.
BRE is basic regular expressions like grep and POSIX ERE are extended regular expressions like egrep. Then there's Apache. Version 1 of Apache used POSIX EREs, Version 2 of Apache uses the PCRE library just like PHP, and then MySQL uses POSIX EREs. Now there're a lot more engines out there than these. These are some of the most popular ones. I wanted to highlight these in particular because I'm going to keep coming back to them throughout the tutorial and letting you know which versions of these support different features that we're going to be talking about.
Now it can be hard to talk about the differences between these different engines. As I said, there're some of the very subtle differences. There's also many engines and languages out there, and I only know a few those. And most importantly, we haven't covered any regular expressions syntax at this point. So even if I told you those differences, they wouldn't mean anything to you just yet. So here's what you need to know at this point. Most of the basic features of regular expressions are the same across all of these. The most notable exception would be old UNIX tools that use the POSIX BREs-- really the very, very early regular expressions.
Most everything else is going to be using EREs and Perl-compatible engines; most of times that's what we're going to have to work with. As we go, I'll highlight the syntax differences and the important exceptions that you need to know about. Also keep in mind that each of these languages is evolving, so supporting each one of them may change or improve over time. So, in every case you want to consult the documentation for that language or that engine to get the real facts about how things work. What I'll be giving you are the general principles of regular expressions that you should be able to take with you, regardless of which one of these languages that you work with.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 105138 Viewers
56 Video lessons · 116919 Viewers
71 Video lessons · 86127 Viewers
131 Video lessons · 41185 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.