I'm in VSCode trying to make snippets and get my head around some of the new regex replacement syntax.
What I want to do is populate parts of my template based on the filename. I can strip the unwanted extensions okay, but I can't capitalize the same value in the next variable.
I have these two lines:
"@Controller('/${1:${TM_FILENAME_BASE/(.*)\\.controller/$1/}}')",
"export class ${1/(.*)/${1:/capitalize}/}Controller {",
The first strips filename and captures the value as $1 for the template. In the second line, I'm trying to use the value from $1 and run it through the capitalize filter.
Nothing I've tried works, although bashing my head against the keyboard feels kind of nice.
Has anyone cracked this nut?