Welcome, regex wizard, to the Possessive Quantification Chamber. Here, you will learn the ancient art of counting the number of possessives in a string.
But be warned, the path to enlightenment is fraught with danger. Your mind will be tested, your fingers will be worn to the bone, and your coffee will be cold.
Using the possessive quantifier ('*'), you can match one or more of the preceding element. For example:
cat *s -> 1 match
cats *s -> 1 match
cat * -> 0 matches
Using the regex possessive ('+'), you can match one or more of the preceding element. For example:
cat +s -> 1 match
cats +s -> 1 match
cat + -> 0 matches
But wait, there's more! Using the regex possessive ('*'), you can even match zero or more of the preceding element. For example:
cat *s -> 1 match
cats *s -> 1 match
cat * -> 0 matches
Don't get lost in the examples! Return to the Possessive Quantification Chamber
Using regex possessives can be hazardous to your mental health. Prolonged use can lead to chronic possessive anxiety, possessive fatigue, and a strong desire to use more parentheses than necessary.