I am porting some libraries from PHP to JavaScript and I came across this regular expression, some parts of it are unclear to me.
#(?: *+(?<= |^)\.((?:\([^)\n]++\)|\[[^\]\n]++\]|\{[^}\n]++\}|<>|>|=|<){1,4}?))#
Unclear parts are
*+
++
I know, that this expression should accept strings like
.(title)[class]{style}<>
.[class]{style}<>
.[class](title){style}
// and so one - no metter of order \(.+\), \[.+\] and \{.+\} parts
// and optional <>, >, = or < at the end
This expression is used with PCRE_UNGREEDY
modifier.