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
Post a Comment