
Explore the core concepts of regular expressions and learn to write your own regular expressions.
The lecture demonstrates using the pipe character for alternation in regular expressions, matching patterns like eat or eight, and combining options inside brackets to match spaces or commas.
Discover how the dot matches any single character, how dot followed by a star captures any string or line, and how greedy matching uses square brackets and pipes.
Walkthrough teaching regex basics: use square brackets to build character classes, constrain the first character to M, m, or S, and match Hadoop or Madobe while excluding other options.
Learn to match adults that start with k or g using regular expressions, first with a square-bracket character class, then with parentheses and a pipe for alternation.
Explains building regex to match adjacent groups, using square brackets and grouping, then applying repetition with curly braces, and comparing round brackets with a pipe for the same matches.
Walkthrough of challenge 11 demonstrates matching lines with curly bracketed country names and a single code, using escapes for quotes to prevent issues in Python and Java.
This walkthrough demonstrates extracting the user agent value from JSON-like text by crafting a regex to capture the text between the user agent and country keys, with escaped quotes.
This course explains the basic concepts of regular expressions and how they could be used for pattern matching to match almost any kind of textual data.
The course is structured in the below manner:
Basic Concepts - Metacharacters and their usage.
Challenges and Walkthrough - Practical Challenges for you to attempt your skills at Regular Expressions. Detailed walk through of solution. Examples include different kinds of data in table delimited format, json and xml.
By the end of the course, you would be confident to create your own regular expressions!
Post any questions you may have and the instructor will get back to you the soonest!
Happy Learning and All the Best!
-----
What are Regular Expressions?
Regular Expression, or regex or regexp in short, is extremely and amazingly powerful in searching and manipulating text strings, particularly in processing text files. One line of regex can easily replace several dozen lines of programming codes.
Regex is supported in all the scripting languages (such as Perl, Python, PHP, and JavaScript); as well as general purpose programming languages such as Java; and even word processors such as Word for searching texts. Getting started with regex may not be easy due to its geeky syntax, but it is certainly worth the investment of your time.
Regular expression synax varies slightly between languages but for the most part the details are the same. Some regex implementations support slightly different variations on how they process as well as what certain special character sequences mean.