Cubehead Posted May 19, 2006 Share Posted May 19, 2006 Hi, when I use something like $var=StringRegExp($somestring, "[a-z]{1,10}") it works but if I try to use $var=StringRegExp($somestring, "[a-z]{1,}]"), I get an @error = 2. What am I doing wrong ? I'm using the v3.1.1.120 beta Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 19, 2006 Moderators Share Posted May 19, 2006 (edited) Hi, when I use something like $var=StringRegExp($somestring, "[a-z]{1,10}") it works but if I try to use $var=StringRegExp($somestring, "[a-z]{1,}]"), I get an @error = 2. What am I doing wrong ? I'm using the v3.1.1.120 betaI get the error too, I guess if they say you should post it in bug reports that Nutster will add it to his "To Do" list for StringRegExp()... but this may be a dirty work around for you until then:$somestring = 'ablAAdGGfoi' $var = StringRegExp($somestring, "[a-z]{1," & StringLen($somestring) & "}") ConsoleWrite(@error & @LF) Edit: P.S. your example of the issue has an extra bracket in it that it doesn't need, I thought that was the error at first (I highlighted it). Edited May 19, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Cubehead Posted May 19, 2006 Author Share Posted May 19, 2006 I get the error too, I guess if they say you should post it in bug reports that Nutster will add it to his "To Do" list for StringRegExp()... but this may be a dirty work around for you until then:$somestring = 'ablAAdGGfoi' $var = StringRegExp($somestring, "[a-z]{1," & StringLen($somestring) & "}") ConsoleWrite(@error & @LF) Edit: P.S. your example of the issue has an extra bracket in it that it doesn't need, I thought that was the error at first (I highlighted it). Gah, I knew I should have double checked my post. Thanks for your answer. 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