<div> matches the characters <div> literally (case sensitive)
1st Capturing Group
(.)*
*matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data
.
matches any character (except for line terminators)
Line terminator(s) are \n
+matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
< matches the character < literally (case sensitive)
\/ matches the character / literally (case sensitive)
div> matches the characters div> literally (case sensitive)
Global pattern flags
g modifier:global. All matches (don't return after first match)