Learn Java Programming - Regex Non-Capturing Groups Tutorial

Publicado el: 27 febrero 2016
en el canal de: Daniel Ross
1,433
13

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)...


En esta página del sitio puede ver el video en línea Learn Java Programming - Regex Non-Capturing Groups Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 27 febrero 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,433 veces y le gustó 13 a los espectadores. Disfruta viendo!