Java Regular Expression Foundation

Learn a solid background of Regular Expressions in combination with different methods to manipulate strings.
4.3 (8 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
142 students enrolled
70% off
Take This Course
  • Lectures 19
  • Length 1.5 hours
  • Skill Level All Levels
  • Languages English, captions
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 10/2014 English Closed captions available

Course Description

Regular expression is one of the fundamental skills in programming tasks. It doesn't matter what kinds of applications you are building, you may have to deal with strings and regular expressions such as finding a sub string, extracting a sub string, validating user's input format, and replacing sub strings.

This course will walk you through all important topics in regular expression from basic to advanced concepts. Also, you will learn how to use regular expression in combination with different methods to manipulate strings in Java. Besides, You also will be able to distinguish the differences among those string-related methods so that you can use them appropriately.

Although this course is demonstrated in Java language, you will almost the same regular expression concepts if you apply them in other programming languages as well such as C#, Python, Perl, and JavaScript.

How to get the most benefits of the course?

To get the most benefits of the course, before starting the first lecture, I would recommend you to take the 30 question quiz first. Don't worry if you never learned regular expression before or you just have a little bit skills. Just do the quiz, if you don't know, just guess.

After finishing the quiz, don't worry about the results then, just take all 19 lectures one by one to learn all the fundamentals as well as advanced techniques.

After completing 19 lectures, take the quiz again to see if you make a progress. Each question in the quiz also has an explanation for right or wrong reasons for each answer, and I would highly recommend you to read these explanations to revise what you have learned.

And I assume students who take this course should already have basic knowledge and skills in Java language.

What are the requirements?

  • Students who take this course should have basic knowledge and skills in Java programming.
  • Examples using in this course are demonstrated on Java 8 with Netbeans IDE 8. But students can use any Java IDE tools since the course itself does not depend on any specific IDE. All those tools are freely downloaded.

What am I going to get from this course?

  • Apply regular expressions to validate user's inputs such as password formats, email formats, phone number formats, and date formats.
  • Apply regular expressions to extract text from a certain string based on a certain patterns such as extracting numbers from a string, extracting email address from a string, and extracting alphabetical characters from a string.
  • Use regular expressions in combination with different classes and methods to manipulate strings
  • Distinguish the differences among different string manipulating methods so that those methods can be used appropriately
  • Apply advanced regular expression techniques to gain better performance
  • 30 question quiz to revise your regular expression skills

Who is the target audience?

  • Any software developers should take this course so that they can have a solid background in using regular expression as well as master different way to manipulate strings
  • This course is also meant for newbies who are not familiar with regular expressions or for some developers who have used some basic patterns but want to revise and learn a solid background about regular expression

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


30 Questions For Testing Regular Expression Skills
30 questions
Section 1: Regular Expression Fundamentals

This lecture will introduce basic syntax in regular expressions. You need to know those basic syntax before going further in other lectures.


This lecture will show you how to validate simple user's inputs such as number, numbers with fixed number of digits, word characters, and letters in combination with digits.


This lecture will show you how to validate patterns with digits and characters in certain ranges, or with particular characters using custom character class. You'll also learn how to restrict the minimum and maximum number of characters inputted from users


You will learn how to use regular expressions to validate simple phone number format and email address format. You'll also learn a basic grouping technique to make the phone format validation a bit more flexible.


I will discuss about basic grouping techniques in Java regular expression so that you can use to force users to input items that should be in a predefined list. You'll also learn how to use grouping technique to validate a date format.


I will discuss about the 2 popular methods in Java that can be used to replace sub-strings in a string: replace() and replaceAll()


In this lecture, you will learn how to extract sub-strings from a text based on regular expression patterns with the Scanner class. You'll also learn how to use the Scanner class to read data from a variable and a text file. This is one of the most important skills when working with string in Java.


You'll learn another way to extract sub-string from a text by using the StringTokenizer class. You'll also see the differences between the Scanner class and the StringTokenizer class. Those differences are very important.


You'll learn another way to slit sub-string from a text using the split() method in the String class. And of course, you'll learn the differences between this method and the Scanner/StringTokenizer class.


This lecture will show you how to use the very powerful and flexible regular expression engine in Java: the package java.util.regex.*. You'll learn how to use the most popular and important methods: matches(), lookingAt(), and the find() method. You need to master these skills before processing in other advanced topics in regular expression.

Section 2: Advanced Regular Expression

This lecture will go into more details about groups and sub-groups. These concepts are one of the fundamentals in regular expressions. With groups and sub-groups, you'll know how to separate a string into sections and extract those section data when you see fit.


This lecture will discuss about boundary meta characters in regular expression. Meta characters are used very frequently in some searching features in many applications such as finding "a whole word" and finding at the beginning of the text.


This lecture show you another advanced technique in regular expression: backreferences. These techniques can be used to find repeated words or data in a string.


This lecture will help you to understand the concept look-ahead which is used very often in regular expressions. This technique can be used to improve the expression pattern checking process.


This lecture will help you to understand the other type of look-ahead: negative look-ahead which can be applied to filter content from certain text.


The concept of positive look-behind will be covered in this lecture which can be used to check if a text is preceded by another text, which is one of the common tasks while working with string.


This lecture will help you to understand the negative look-behind concept which works in the opposite way to the positive look-behind, in which you can use to check if a text is NOT preceded by a certain text pattern.


This lecture will show you other very important concepts in regular expression: Greedy and Quantifiers. Mastering these concepts will help you to design very flexible expression patterns.


The final lecture and also very important one: you will learn the possessive quantifiers and how these techniques affect the performance as well as the matching results of a certain expression pattern.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Sera Nguyen, Developer, Architect, Professor

Hi, my is Sera Nguyen and I have a big interest in Software Programming. After completing my Computer Science degree, I was employed as Embedded Software Engineer at Renesas Corporation, then Software Architect at CSC Corporation. After more than 6 years in the Software Industry and completing my Master degree, I became a full time University Professor specializing in Software Engineering Faculty. Currently, I am still working full time as Professor and contracting trainer for software companies and doing research for my PhD degree in software architecture design field.

Ready to start learning?
Take This Course