Chris,

One has to ask why do the many who don't know copy from the few who know how to write a RegEx? One possibility is the lack of good material on the specific flavor of RegEx in the language they are using.

Since the example is trying to validate you can skip the PrxParse, and jump right into a PrxMatch since the pattern doesnt vary from one observation to the next it will only be compiled once .

One can lose the look-ahead as that only waste cpu cycles. The RegEx optimizer will kick in when you use the beggining and end of line metacharacters and negate the need for the look-ahead.

Lose the caputure parens will speed it up as it wont need to store text in memory and not use it.

It can further be shortened down if you also use the /i pattern modifer to do a case insensitive match.

PrXMatch( '/^[a-z]\w{0,31}$/i' , Var )

Works faster on my unix box running 9.1.3 but should be faster on all boxes and its easier to type.