Reputation: 51
I need to convert one vb6.0 project into vb.Net project. I am not much familiar with .Net regular expressions. What will be the regular expression in vb.net that will be equivalent to vb Like "*_?#"
Upvotes: 0
Views: 374
Reputation: 1220
VB6 'Like' syntax:
* = zero or more characters
_ = _ character
? = any single character
# = any digit (0-9)
.NET Regex equivalent:
.* = zero or more characters
_ = _ character
. = any single character
\d = any single digit
So your regex string is '.*_.\d'
Edit: replaced [0-9]
with \d
Upvotes: 1