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.

enter image description here

or, can split non-letters \p{l}+ regex if there no matching multiple occurrences functionality.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -