If Conditionals

Length: 00:08:33

Lesson Summary:

Regular expressions allow us to craft rudimentary if-then-else statements within the expression itself. These allow us to ensure that if specific match parameters are met, a defined subexpression is matched; if they are not, the regex engine continues to attempt to match the expression using the expression in the "else" section of the expression. This allows us to refine our matches further and opens up the opportunity to craft simple if statements in programs like sed and grep, without needing to use a more extensive scripting language.

Get the lesson files here!:


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More