Setting up a snippet in Visual Studio Code with regex
问题 { "Comment": { "prefix": "#", "body": "<!-- ${TM_FILEPATH/([^/]*\/[^/]*)$/$1/} -->" } } I have set up the about code snippet, the purpose is to add a comment that adds the file's base directory and file name <!-- templates/base.html --> like this but discards the rest of the path. I believe this is originally based on TextMate snippets. I have tried everything but I can't get it to work, it's probably something silly but I don't see what I'm doing wrong. Using just TM_FILEPATH without the