Convert JavaScript Regex to C#

Solution 1:

Remove / at the start and the end of the string.