Preg_match matching content that's between angle brackets

How can I modify the following regex (?:(\s{2,})|(\s>)) to work on only what’s between angular brackets ( < & > ).

Currently, this matches everything that’s not enclosed in angular brackets as well.

And my attempt (?<=<)(?:(\s{2,})|(\s>))(?=>) to get it to work with angular brackets does nothing at all.

Here is the link to the original code on along with what needs to be matched and not, and my attempt (which does not work).

Can someone please help?

Does this do it?

Your solution matches everything between angular brackets. I’m trying to match only multiple spaces and spaces before the closing angular bracket…

You’ll get a more clearer picture if you check the first link.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.