This is probably only just an Sublime Text 3 question but after two and half hours I give up trying to do it my self, and ask for help.
I have an ST3 for C++ class. And for the header guards I’d like to turn
myclassfile.hpp into MYCLASSFILE_HPP
ie turning the name of the file into capitals and replacing the “.” with “_”
This “capitalises” and gets rids of any forward slashes:
#ifndef ${1:${TM_FILENAME/(.+)[^/]/\U\/(\w)?[.]_ $1/:name}}
#define ${1:${TM_FILENAME/(.+)[^/]/\U\/(\w)?[.]_ $1/:name}}
This is what I’m currently trying and is failing
#ifndef ${1:${TM_FILENAME/[^/.]/\U\_?[:all]+ $1/:name}}
#define ${1:${TM_FILENAME/[^/.]/\U\_?[:all]+ $1/:name}}
And this is part of the snippet, just so you get an idea of what’s going on. I’ve been working at this on and off for a year, so it’d be nice if I could get this little (ha ha ha ha ha) job sorted !

<snippet>
<content><![CDATA[
#ifndef ${1:${TM_FILENAME/[^/.]/\U\_?[:all]+ $1/:name}}
#define ${1:${TM_FILENAME/[^/.]/\U\_?[:all]+ $1/:name}}
// #define NDEBUG
class ${2:${TM_FILENAME/(.+)\..+|.*/$1/:name}}
{
public:
${2/(\w+).*/$1/}($3)
{}
~${2/(\w+).*/$1/}()
{}
${2/(\w+).*/$1/}(${2/(\w+).*/$1/} const& other) = default;
${2/(\w+).*/$1/}& operator=(${2/(\w+).*/$1/} const& rhs)
${2/(\w+).*/$1/}(${2/(\w+).*/$1/}&& other)
{
std::cout<<"move";
}
${2/(\w+).*/$1/}& operator=(${2/(\w+).*/$1/}&& other)
{
I’m sure I’m not a million miles away, but there’s only so much failure at the start of the day I can put up with 
Muchisimos gracias
