vb.net regular expressions howto ???

liunx

Guest
I am building a calculator to try and learn vb.net. Unfortunatly I am running into problems with several things.

I need to take a textfield and see if it contains a decimal point to make sure that the user cannot add more than 1 decimal point to a number.

from what I have seen on most of the tutorials I was lead to believe that this would work. Unfortunatly I am getting a blue squiggle undernieth the regex part.

If RegEx.match(txtInput.Text, "/\./") Then

what am i doing wrong and how do I fix this?

I also am storing the operator in a textfield and was wondering how to convert it to a usable operator. So if the user wants to add 2 numbers I store the string "+". Can I convert this to an operator or do I have to use a switch to check the string to decide what to do the the 2 numbers and operator?


tiaThank means you need to include System.Text.RegularExpressions on top of the page.

Eric
 
Back
Top