Sign in to follow this  
Followers 0
Cubehead

Regular expressions

4 posts in this topic

Hi,

I'm running into regular expressions trouble (again). I need to check if a string is composed of 6 hexadecimal characters. In v3.2.0.1 I used something like

$nDummy = StringRegExp($strString, "^([:xdigit:]{6})$", 0). It worked perfectly.

In v3.2.1.14 the pattern is not valid, and the @extended error tells me that the pattern is invalid at the "[" character. Can someone help me fix my pattern ? Thanks in advance.

Cubehead

Share this post


Link to post
Share on other sites



Hi,

I'm running into regular expressions trouble (again). I need to check if a string is composed of 6 hexadecimal characters. In v3.2.0.1 I used something like

$nDummy = StringRegExp($strString, "^([:xdigit:]{6})$", 0). It worked perfectly.

In v3.2.1.14 the pattern is not valid, and the @extended error tells me that the pattern is invalid at the "[" character. Can someone help me fix my pattern ? Thanks in advance.

Cubehead

$nDummy = StringRegExp($strString, '^([0-9A-Fa-f]{6})$', 0)

[center]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.[/center]

Share this post


Link to post
Share on other sites

$nDummy = StringRegExp($strString, '^([0-9A-Fa-f]{6})$', 0)
Thanks a lot SmOke_N and D'oh ! I should have paused and look at the problem with a little bit of distance and from another angle. Oh well. :P

Cubehead

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry, broke the rules here.

Edited by gruntydatsun

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0