Jump to content

Regular expressions


Cubehead
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • 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
 Share

  • Recently Browsing   0 members

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