.net - How to check String Contains Alphabets or Digits-Regular Expression c# -


how check whether string contains alphabets or digits using regular expression. in single regular expression how can achieve in c#.currently finding alphabets

 regex.matches(folderpath, @"[a-za-z]").count 

whether string contains alphabets or digits

for case:

regex.matches(folderpath, @"[a-za-z0-9]").count 

should work.


Comments