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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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