Something is actually wrong with your regular expression, or at least it causes the expression to act in an unpredictable way (for me).
An expression can be decomposed as such:
([a-zA-Z]+\\()| (?# matches alphabetical characters and an opening round-bracket) ((<.*?>)| (?
Since the operator | is never greedy, the third template is started (matching an empty string) before the 4th template you really need.
The proof of this is that the tokens that you actually get with your regular expression:
'' '' '' 'Action(' '<entity>' '<entity>' '<Asset>' '' ''
So you probably want something like this:
([a-zA-Z]+\\()| (?# matches alphabetical characters and an opening round-bracket) (<.*?>)| (?
Please note that I deleted the statement ? from the 4th template, which was strangely set outside the brackets, and also removed an empty line.
source share