in reply to Re: Regex (lookahead) Confusion
in thread Regex (lookahead) Confusion

Roger, can you please explain this a bit to us mere regex mortals? Thanks!

Replies are listed 'Best First'.
Re: Re: Re: Regex (lookahead) Confusion
by Roger (Parson) on Feb 05, 2004 at 23:05 UTC
    if (! /([smtwhfa])(?=.*?\1)/) { | | | | | +----- followed by this character | +--------------- find any of these characters +-------------------- but take the negative of the match

    bart's regex below is much better, see his reply and follow-up's.