Jump to content

Recommended Posts

Posted (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 by michaelslamet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...