Ken Bloom wrote:
How can I match, in one regexp strings that begin with "att_" but do not
begin with "att_appraisal"?

In perl or something with perl's regexp capabilities, you'd use a negative lookahead:

        ^att_(?!appraisal)

Without that, your best bet is to combine two regexps using boolean logic:

        if (/^att_/ && !/^att_appraisal/)

You could do this with one regexp but it's ugly:

        ^att_($|[^a]|a($|[^p]|p($|[^p]|p($[^r]|...

i.e., "att_" followed by end-of-string OR not-a OR a followed by (end of string OR not-p OR p followed by..
_______________________________________________
vox-tech mailing list
[email protected]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to