michaelslamet Posted September 12, 2013 Posted September 12, 2013 (edited) One of my small script need user input, which is only accept minus sign (with or without), number(s), comma(s) and dot(s). So if user input: 1-1233455678.12121,1999 or 11233455,678.12121.1999 it will considered as valid and this is considered as invalid: 1123-345a because it contain character "a" Currently I can check if the string is consist of A-Z or a-z by using StringRegExpReplace($sString, "[A-Z]", "") If @extended > 0 Then $valid = False StringRegExpReplace($sString, "[a-z]", "") If @extended > 0 Then $valid = False Thank you Edited September 12, 2013 by michaelslamet
Solution Mat Posted September 12, 2013 Solution Posted September 12, 2013 So you want something like: "[^-,d.]". There I am matching anything that is NOT - or , or 0-9 or . michaelslamet 1 AutoIt Project Listing
michaelslamet Posted September 12, 2013 Author Posted September 12, 2013 So you want something like: "[^-,d.]". There I am matching anything that is NOT - or , or 0-9 or . Haha, yes, Mat. Thank you very much That solve my problem
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now