In this tutorial, I will explain the building blocks of Regular Expressions (or REGEX), so that you can understand them and use them in Google Analytics and Google Tag Manager.
What is a Regular Expression?
Regular expressions, also called regex, are a set of characters which help you to find specific data in a data set. They are a very powerful tool to find and match data while applying a specific set of filters.
It is an expression that is used to check for a pattern in a string. For example ^Colou?r$ is a regular expression that matches both the string: ‘color’ and ‘colour’.
A regex is made up of characters and metacharacters…
Read the article at https://www.optimizesmart.com/regular-expression-guide-for-seos/.
I love https://regex101.com/ for testing regex, they have a great interface that helps build them properly and learn along the way.