using regex to select line matches

Hi,
How do you select all lines that don't start with a particular
word? For example,

^[^d].*$

selects all lines that doesn't start with the letter d. But how I
select all lines that doesn't start with the word "date". I tried
^[^date].*$ but this selects all lines that doesn't start with d, a,
t or e.

Advertisements

nadabadan <> wrote:
>Hi,
> How do you select all lines that don't start with a particular
>word? For example,
>
>^[^d].*$
>
>selects all lines that doesn't start with the letter d. But how I
>select all lines that doesn't start with the word "date". I tried
>^[^date].*$ but this selects all lines that doesn't start with d, a,
>t or e.

Advertisements

nadabadan wrote:
> How do you select all lines that don't start with a particular
> word? For example,
>
> ^[^d].*$
>
> selects all lines that doesn't start with the letter d. But how I
> select all lines that doesn't start with the word "date". I tried
> ^[^date].*$ but this selects all lines that doesn't start with d, a,
> t or e.

For most practical purposes, Steven's solutions is probably sufficient.
This is a regex that may be a more direct answer to your question:

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!