Skip to content Skip to sidebar Skip to footer

Xregexp: "unmatched ')'" Yet Everything Appears To Be Balanced

I've written the following line of code: XRegExp.exec(data, XRegExp('', 'g')) As you can see it is

Solution 1:

I've updated my answer to meet the new information provided.

Given the example of what you're trying to capture the original regex won't match.

The following will match any characters between [( to component and anything between () to classes.

\w matches a word, digit, or underscore. This would leave it missing your [-,] characters

Hopefully this helps.

<!-- @\[(?<component>[\w]*)\((?<classes>.*?)\)*\] -->

@[Component(Classes - warning, highlevel)]

Post a Comment for "Xregexp: "unmatched ')'" Yet Everything Appears To Be Balanced"