I want to replace all (start and end) of the string but the parameter in the middle (for example @ModelKey or @ProductNumber) from this Input
[MODEL_KEY] = IIF(@ModelKey IS NOT NULL, @ModelKey , [MODEL_KEY]),
[PRODUCT_NUMBER] = IIF(@ProductNumber IS NOT NULL, @ProductNumber , [PRODUCT_NUMBER]),
i need this output
@ModelKey
@ProductNumber
In my regex101.com example this works
(.*)(\@.*)(\sIS)(.*)
as expected
- Group $1
(.*)for example[MODEL_KEY] = IIF(can be removed - Group $2
(\@.*)is the group to keep@ModelKey - Group $3 and $4
(\sIS)(.*)are the groups that can be removed
As you can see in this image
But in vs code the expression (.*)(\@.*)(\sIS)(.*) results in an error message:
Invalid regular expression
Invalid esape
Question
- Does visual-studio-code uses the same regex syntax as ecmascript?
- What must be changed to make the regex work in vs-code?

