• Notice regarding image hosts and attachments. See here.

Regex help

Soldato
Joined
18 Oct 2002
Posts
7,514
Location
Maidenhead
Hi all,

Looking for some help with regex please. My example data:

a) ifvmsqltestx1
b) ifvmdevx1
c) ifvmx1

I need 3 statements

1) returns when the string "test" is found e.g. only a
2) returns when the string "dev" is found e.g. only b
3) returns when neither the string "test" nor "dev" is found e.g. only c

Many thanks in advance
Alc
 
Last edited:
Hi thanks for the reply. I am using a built in regex function, not developing so I have to use regex. 1 and 2 are fine as I just use "test" or "dev", but 3 does not work as the regex has to match the value.
 
It's an SSMS plugin - apparently Any .Net regular expression is valid.

I think I may have it with (?!test)|(?!dev) - does that sound right?
 
Back
Top Bottom