How to understand capture in regularization

What is the difference between capture and matching in

regularity?


match: I'm looking for a string that looks like this.
capture: I'm looking for a string that looks like this, and I need to get some parts of the matching string (capture).

for example, get all links in the form of https://codeshelper.com/t/xxx from the current web page.
but my real goal is not to link but to capture xxx, with a grouping at this point.

Why not capture xxx directly, which may match to other strings that do not meet the requirements, or it can be understood as matching roughly first, and then narrowing down the scope to get what you really need.


about grouping / capturing / looking around in regularization

Menu