c# - Regular Expression to check doubles, triples etc -



c# - Regular Expression to check doubles, triples etc -

i need regular look retrieve no of doubles, triplets, tetras etc telephone number

following example, number 1001055522 should homecoming me

group numbers ============================= doubles 00 22 triplets 555

this regex when used regex.matches produce exact double or triple (not part of longer consecutive sequence). due greediness of quantifier.

(\d)\1+

demo

well, rest check length of string , count... leave you.

c# regex

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -