Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

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)

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.

Posted

$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

  • 4 years later...

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...