On Fri, Feb 20, 2009 at 10:46:00AM -0700, Richard Fairbanks wrote: > > Ditto. What I need to know is how to find any line that does not > contain the word "Excluding"; the following do not work: > > ^(.+)(?:Excluding)(.+)(\r+)
This will match lines that /do/ contain the word 'Excluding', other than as the very first or very last thing in the line. > ^(.+)(^(Excluding))(.+)(\r+) This won't match anything. You can't match the beginning of line at two different places in the same line. Try this: ^(?!.*Excluding)(.+)(\r+) Starting from the beginning of a line, do a negative lookahead for .*Excluding. If the word 'Excluding' appears anywhere in the line, this will find it. If it's not found, then match the whole line and any number of carriage returns. Ronald --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[email protected]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---
