excel - Regex that do not match a line if any string from a list is present -


i writing classification app engineering data , faced tricky problem. have (huge) list of piping components, , need classify them. have this:

 ... flange neck flange blind stub end ... flange flange ... foo flange ...

when have flange, want match "simple flange" category. other entries need matched specific kind of flange.

i have found flange((?!neck).)*$ not match "flange neck" match "flange blind", , don't want that.

so, figured solve problem this:

/flange(*not neck*)(*not blind*)(*not stub*).../

any thoughts on how handle it?

ps: i'm doing regex thing in excel's vba.

you're looking alternation operator, |.

/flange (?!neck|blind|stub)/ 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -