Regex expression

regex

#1

Hi,

Just a quick question.
I am using regex to match a string. Please help in letting me what is a regex pattern to determine blank space.
For eg:
0123445555 A1455667
I am trying it like this.
"%%%[0-9]/\s[0-9]". But is displaying false.
Please help!


#2

Yo can try this : Regex.IsMatch(“0123445555 A1455667”,"\s") // It will only check that is any space exists or not.

Except Regular Expressions These will also work well:
String myString= “0123445555 A1455667”;
String.Any(function(x) char.IsWhiteSpace(x))

or

“0123445555 A1455667”.Contains(" ") // returns true

Regards…!!
Aksh


Split Char.IsWhiteSpace