Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 

Regular Expressions 3

Welcome! International Date Ordinal Validation


 S  M  L  XL  FS | Slo Reg Fast 2x 

Welcome to Access Developer 67. We will continue our Regular Expressions work by expanding date parsing and validation for day-first formats, ordinal endings, complete month names, and two-digit years. We will also discuss practical RegEx patterns for mail merge placeholders, repeated words, filenames, IP addresses, dollar amounts, URLs, version numbers, HTML color codes, and 12-hour and 24-hour times, while adding useful expressions to the RegEx Pattern table.

Navigation

Keywords

Access Developer, regular expressions, VBA regex, date parser, date validation, ordinal dates, day first date format, month name validation, two digit years, IPv4 validation, IPv6 validation, URL extraction, dollar amount regex, repeated words, mail merge

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Regular Expressions 3
Get notifications when this page is updated
 
More Information
Transcript 
Welcome to Microsoft Access Developer Level 67, brought to you by Access Learning Zone. I am your instructor, Richard Rost.

Today, we're continuing our work with regular expressions. We're going to finish up several practical techniques that we started in the previous developer lessons. We'll expand our date parser to recognize international date formats where the day comes first, along with ordinal endings like first, second, third, and so on. We'll improve our VBA functions to validate those dates properly, including checking real month names and rejecting invalid ordinal endings.

Then we'll look at a collection of useful regular expression patterns for everyday jobs, like finding IP addresses, extracting URLs, recognizing dollar amounts, and validating different kinds of text. We'll also continue building our RegEx table so you've got a reusable collection of patterns you can come back to whenever you need them. The goal isn't to memorize every pattern, but to understand how they work, how to test them, and when regular expressions might be the right tool for a problem.

This class follows Access Developer 66, and 66 follows Access Developer 65. I strongly recommend you watch both of those classes before watching this one. Today's class is basically part three of a three-part series. In those two classes, we build our RegEx Test, RegEx Extract, and RegEx Replace functions, along with our RegEx Pattern table. Developer 66 is especially important because we'll be continuing with the date extraction and validation functions that we built in that class.

And, of course, as always, I recommend you take all of my classes in order and don't skip levels. It is currently November of 2026. I'll be using Microsoft Access with Microsoft 365. The Access and VBA techniques we're covering are generally applicable to older versions of Access as well. I covered the differences and what you'll need to know if you're using an older version of Access back in Developer 65.

If you've got any questions about the material covered in today's class, just scroll down to the bottom of the page that you're on and post the question in the questions section on that page. You'll find a discussion through everything with questions and answers from other students. Take a minute to look through those first. Someone may have already asked the same question and gotten an answer.

Don't forget to click the subscribe button in that section. That way, you'll be notified whenever someone posts a new question, answer, or comment about the class.

If you have any questions about Microsoft Access that are not related to the material covered in today's class, post those in the Access Forum instead. That's the best place for general Access questions, troubleshooting, and discussions about your database projects. Posting in the forum also allows other members of the Access Learning Zone community to join the conversation, including people who are not enrolled in today's class. They'll have a much larger group of people who can help share ideas and learn from that discussion.

All right, let's take a closer look at what's covered in today's class.

In lesson one, which is regular expressions part nine, we're going to expand our existing date patterns to recognize dates written with the day first, such as 5 February 2020, along with ordinal dates like November 15th, 2026. We'll save our new patterns in the RegEx table and combine them with the expressions we've already built in Developer 66.

We'll also improve our month number function so it checks complete month names instead of just the first three letters. That means our old friend Jan. You, Vembers will no longer be accepted as a valid month.

In lesson two, we're going to finish improving our date validator. We'll build a new day from text function that takes values like first, second, or 23rd and converts them into actual day numbers. We'll make sure the ordinal endings are correct so we don't get first or 20 seconds. All right, those get rejected.

Then we'll modify our existing validate candidate date function to handle both day-first and month-first dates, including two-digit years. We'll test the new formats and make sure our ordinal date formats still work.

In lesson three, we're going to finish our hands-on regular expressions work with a collection of practical patterns, a plethora of practical patterns. We'll find unfinished mail merge placeholders, detect accidentally repeated words, and validate imported file names. We'll look at both IPv4 and IPv6 addresses, extract dollar amounts and website URLs, recognize software version numbers and HTML color codes. Then we'll match both 12-hour and 24-hour time formats.

This lesson isn't about building a bunch of new VBA functions. Instead, we'll use the RegEx tools we've already created, examine how each pattern works, and save useful expressions in our pattern table for future reference.

By the end of this level, you're going to have a more capable date parser, a better understanding of how to combine and validate regular expression patterns, and a substantial library of useful examples. I'm tongue-tied tonight, folks, that you can adapt for your own databases. More importantly, you'll have a better idea of when regular expressions can save you time compared with writing complicated string processing code from scratch.

And remember, you don't have to memorize all of this syntax. Understanding what these tools can do, knowing how to test them, and knowing when to use them is what really matters.

As always, I recommend you watch each video once completely through, then watch it a second time and follow along with the examples.

Okay, grab your coffee or your Diet Coke or whatever you're drinking, sit back, relax, and let's get ready to start lesson one.
Intro 
Welcome to <B>Access Developer 67</B>. We will continue our Regular Expressions work by expanding date parsing and validation for day-first formats, ordinal endings, complete month names, and two-digit years. We will also discuss practical RegEx patterns for mail merge placeholders, repeated words, filenames, IP addresses, dollar amounts, URLs, version numbers, HTML color codes, and 12-hour and 24-hour times, while adding useful expressions to the RegEx Pattern table.
Summary 
Today's video from Access Learning Zone continues our work with regular expressions in Microsoft Access VBA. This is Microsoft Access Developer Level 67, and it is the third part of a three-part regular expressions series. In this lesson, I will build on the RegEx Test, RegEx Extract, RegEx Replace, and RegEx Pattern table tools that we created in the previous developer classes.

Before continuing, I strongly recommend that you complete Access Developer 65 and Access Developer 66. Developer 66 is especially important because this lesson continues the date extraction and date validation work that we started there. As always, I also recommend taking the courses in order so you have the proper foundation for each new topic.

I am using Microsoft Access with Microsoft 365 as of November 2026. However, the Access and VBA techniques covered here should generally work in older versions of Access as well. I previously discussed version differences and compatibility considerations in Developer 65.

In this level, I will expand our date parser so it can recognize more natural-language date formats. We will add support for international-style dates where the day appears before the month, such as 5 February 2020. We will also handle ordinal dates, including formats such as November 15th, 2026.

To support these new formats, I will add additional regular expression patterns to the RegEx Pattern table and combine them with the date patterns created in the previous lesson. This will give us a more flexible reusable system for recognizing dates inside text.

I will also improve the month-number function. Previously, it could accept a month based primarily on its first three letters. That could allow invalid text beginning with something like Jan or Nov to be treated as a valid month. We will improve that logic so complete month names are properly checked and invalid month text is rejected.

Next, I will finish improving the date validation process. We will create a DayFromText function that can convert words and ordinal values into day numbers. For example, it will be able to interpret values such as first, second, third, and 23rd. Just as importantly, it will verify that ordinal endings are correct. Invalid values such as first, 20 seconds, or other improperly formed ordinal dates will not be accepted.

Once that function is in place, I will update the ValidateCandidateDate function. It will be able to handle both month-first and day-first date formats, along with dates containing two-digit years. We will test the various possible date formats and make sure that valid ordinal dates are accepted while invalid ones are rejected.

The final lesson in this level focuses on a variety of practical regular expression patterns that you may find useful in everyday database work. Rather than creating a large number of new VBA functions, we will use the RegEx tools we have already built and examine patterns that can be saved in the RegEx Pattern table for future use.

We will look at patterns for finding unfinished mail merge placeholders and detecting accidentally repeated words. These can be helpful when reviewing imported text, letters, documents, and other stored content.

We will also examine validation patterns for imported file names. This can help you identify file names that do not meet your expected format before processing them further in your database.

Other examples will include recognizing IPv4 and IPv6 addresses, extracting dollar amounts, and identifying website URLs within text. We will look at patterns for software version numbers, HTML color codes, and both 12-hour and 24-hour time formats.

The purpose of these examples is not to force you to memorize every regular expression pattern. Regular expressions can become complex, and there is no need to keep every possible pattern in your head. What matters is understanding what regular expressions can do, knowing how to test a pattern, and recognizing when a regular expression is a better solution than writing extensive custom string-processing code in VBA.

By the end of this level, you will have a more capable date parser, improved date validation, and a larger collection of reusable regular expression patterns. You will also have a better understanding of how to combine pattern matching with VBA validation logic when a regular expression alone is not enough.

If you have questions specifically related to this class, post them in the questions section for this lesson on my website. Before posting, take a moment to review the existing questions and answers, since another student may already have asked the same thing. You can also subscribe to the discussion so you receive notifications when new questions, answers, or comments are posted.

For general Microsoft Access questions that are not directly related to this lesson, use the Access Forum. That is the best place for broader database questions, troubleshooting, and discussions about your own Access projects. The forum also allows more members of the Access Learning Zone community to participate and share ideas.

I recommend watching the lesson all the way through once, then watching it again while following along with the examples in your own database.

You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List 
International day-first date patterns
Ordinal date endings in date formats
Date validation with full month names
Converting ordinal day text to numbers
Validating day-first and month-first dates
Practical regular expression pattern examples
Finding mail merge placeholders
Detecting repeated words
Validating imported file names
Matching IP addresses and URLs
Extracting dollar amounts
Recognizing version numbers and HTML colors
Matching 12-hour and 24-hour times
Primary Topics 
day-first date recognition, ordinal date parsing and validation, month-name validation, candidate date validation, RegEx pattern table, practical regular expression patterns
Secondary Topics 
two-digit years, IP address recognition, URL extraction, dollar amount extraction, filename validation, repeated-word detection, time validation
 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/23/2026 8:00:12 AM. PLT: 2s
Keywords: Access Developer, regular expressions, VBA regex, date parser, date validation, ordinal dates, day first date format, month name validation, two digit years, IPv4 validation, IPv6 validation, URL extraction, dollar amount regex, repeated words, mail merge  PermaLink  International Date Formats, Ordinal Validation, and Practical RegEx Patterns