A non-capturing group allows you to group a pattern (token) without the regex engine automatically assigning a group number. There are many reasons for using non-capturing groups, some common uses are: faster search results, inline modifiers (or embedded flag expressions), and excluding patterns from the .group(...) method results. At this point I would like to take a moment to make you aware that the ? metacharacter is just about the most versatile of all the metacharacters and where it is placed in a regex can make a dramatic difference on search results. Non-capturing groups use the same syntax as capturing groups only you must include a ?: just inside of the opening parenthesis.
Inline Modifiers, aka Embedded Flag Expressions
If you have been watching my tutorial series thus far, then you have seen me demonstrate the case-insensitive inline modifier (?i)...
Auf dieser Seite können Sie das Online-Video Learn Java Programming - Regex Non-Capturing Groups Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Daniel Ross 27 Februar 2016 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,433 Mal angesehen und es wurde von 13 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!