< # literally just an opening tag followed by a space
( # the bracket opens a subpattern, it's necessary as a boundary for
# the | later on
?: # makes the just opened subpattern non-capturing (so you can't access it
# as a separate match later
" # literally "
[^"] # any character but " (this is called a character class)
* # arbitrarily many of those (as much as possible)
" # literally "
['"] # either ' or "
* # arbitrarily many of those (and possible alternating! it doesn't have
# to be the same character for the whole string)
| # OR
' # literral *
[^'] # any character but ' (this is called a character class)
* # arbitrarily many of those (as much as possible)
' # literally "
['"]* # as above
| # OR
[^'">] # any character but ', ", >
) # closes the subpattern
+ # arbitrarily many repetitions but at least once
> # closing tag
正規表現内のすべてのスペースは、他の文字と同じように扱われることに注意してください。それらは正確に1つのスペースに一致します。
^
また、キャラクタークラスの冒頭にあることに特に注意してください。個別の文字としては扱われませんが、文字クラス全体が反転します。
また、(義務的に)正規表現はHTMLの解析には適切ではないことを付け加えるかもしれません。