11 Jul 2013, 15:51
Portrait-robert_pragsmall

Robert Dober (20 posts)

At first sight the rgx is just wrong "^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\d])(?=.*[\W]).*$"

To be sure I checked in C26.0.1410.63 and it clearly treats the rgx as expected:a concatenation of uncaptured groups instead of a conjunction of them. Now I wanted to put this into the errata just to find out that my rgx skills are more limited than I hoped. The only way I see is a very ugly, long and unreadable list of alternatives of all permutations of sequences like UC.*LC.*... | LC.*UC.* ... where I cannot even construct the length constraint.

Any ideas about this?

Cheers Robert

11 Jul 2013, 16:01
Portrait-robert_pragsmall

Robert Dober (20 posts)

It obviously worx, it just took me some time to eliminate typos and reload the page too.

But why does it work, as mentioned above these are concatenations, what rgx variant is this?

Thx Robert

16 Jul 2013, 12:59
Portrait-robert_pragsmall

Robert Dober (20 posts)

I knew already that I was stupid, but would have preferred to keep that to myself

Actually I confused (?: with (?=

(?= is a zero width positive lookahead and thus (?=a)(?=b) means we are implementing the conjunction of patterns a and b, which I failed to understand.

Pretty neat, maybe still merits an explanation or maybe a link to some useful rgx resource.

Sorry if my prior posts were as confused as YHS.

Cheers Robert

  You must be logged in to comment