regex - Use Regular Expression to match a repeated pattern -
look @ simple string: https://regex101.com/r/iu8ue5/2
using repeated capturing, can please show me expression match capturing group 1: aaa capturing group 2: bbb capturing group 3: ccc
problem have such pattern in middle of string , number of delimiters (here: 4) varies need have repeated regex. use pcre dialect. thanks
to match 3 consecutive letters in pcre, can use \p{l}
shorthand class {3}
limiting quantifier:
\p{l}{3}
see demo
mind need add g
flag on regex101.com enable multiple matching.
or, can split non-letters \p{l}+
regex if there no matching multiple occurrences functionality.
Comments
Post a Comment