Maybe somebody could help me, how to create regex, that will find two characters with the same amount one after another :
ex. +++--- : true (3)
ex. ++++---- : true (4)
ex. ++--- : false (2 - 3)
Thanks in forward
Maybe somebody could help me, how to create regex, that will find two characters with the same amount one after another :
ex. +++--- : true (3)
ex. ++++---- : true (4)
ex. ++--- : false (2 - 3)
Thanks in forward
I don't think you can match something like that in regex.
A workaround would be to split at boundaries between different characters with this regex:
(?<=(.))(?!\1)(?!$)
and see if the resulting array is: