I was reading regular-expressions.info examples to try to learn more regex patterns.
The first example Grabbing HTML Tags talks about a regex for the opening and closing pair of a specific HTML tag.
<TAG\b[^>]*>(.*?)</TAG>
I'm a little confused here. Why is \b[^>]*
added to the above regex pattern, where the same thing can be achieved by using the below regex pattern:
<TAG>(.*?)</TAG>
Why is this extra regex pattern used? Will it help in any performance?