Robert Menschel <[EMAIL PROTECTED]> wrote: > CE> How can I match the following: "s\.ex" and "se\.x" and > "s\.e\.x" but CE> not "sex" without including all the possible > permutations? Is there CE> an elegant solution? > > Would /\bs\.?e\.?x\b/ work?
No, because that matches "sex". But this would work: /\b(?!sex)s\.?e\.?x\b/ The negative lookahead prevents it from matching "sex" if it's unobfuscated. -- Keith C. Ivey <[EMAIL PROTECTED]> Washington, DC ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk