Happy New Year!
A user inputs regex patterns and a input text and if the user input text matches any of the pattern, the below code give the grouping
i