'SQL Replace command with Regex

So I am trying to run this SQL command

Select Replace('[1,2,3,47]','%[0-9]\,|\[|\]%','');

this regex should give the following result

47

however, the original string is not being replaced. How can I make the REPLACE function read the regex code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source