Let’s say you have a string and want to match individual groups of characters against that string. How would you do that? That’s the question I asked myself. The following code is the outcome of some research on how to get this done. It shows you how to capture/match and name groups of characters using a regex.