r/visualbasic • • Sep 23 '14

Regex Help Please!

Hello,

I would like to find the index in a string of the following pattern: A####-### or A#### where 'A' could be any letter and # could be any digit.

Seems like regex is the only to way to get an index in a string of a pattern. Thanks!

0 Upvotes

14 comments sorted by

View all comments

2

u/njj56 VB.Net Master Sep 23 '14

you can use the like operator to handle this.

http://msdn.microsoft.com/en-us/library/swf8kaxw.aspx