We don’t explain problems as you require. First, tell us what it is that you don’t understand, and what you’ve tried so far.
As a first hint, regex means regular expression. Which is an instruction for the engine to find a particular string i.e a word, set of words, number, symbol.
A real life example would be this: find all people with red jackets and blue buttons in a disco. In regex, you tell the computer this, and it looks for it.
In the code you pasted there are three variables. The regex one is what I’ve explained before. The result variable will store the result of your search (regex) over text.