smellyfingers Posted January 14, 2012 Share Posted January 14, 2012 Hi all, im new to autoit but learning the hard way even if this site makes it easier with all the great ppl. Anyway i wonder if there is a way to make the $RegExp work like this, if a user types in 15 in a input field and then the code would look like this $RegExp = StringRegExp ($Clip, "(\d{15})", 1), or if the user types 10 instead the code looks like this, $RegExp = StringRegExp ($Clip, "(\d{10})", 1), so i basically wonder if there is a way to use a variable in the "(\d{10})" field were the {10} is located, thanx in advance! Link to comment Share on other sites More sharing options...
funkey Posted January 14, 2012 Share Posted January 14, 2012 I don't know exactly what you want, but it is easy to have a variable in the pattern. $iNum = 10 StringRegExp($Clip, "(d{" & $iNum & "})", 1) Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
smellyfingers Posted January 14, 2012 Author Share Posted January 14, 2012 I don't know exactly what you want, but it is easy to have a variable in the pattern. $iNum = 10 StringRegExp($Clip, "(d{" & $iNum & "})", 1) Fantastic, i almost did that i just forgot 1 little & , yeah that was exactly what i was looking for, thanx a million Link to comment Share on other sites More sharing options...
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