How can I make the first letter upper case in the following:
${1:${TM_FILENAME/[\.php]+$//}}
Basically if the filename is "welcome.php", I'd like it to write out "Welcome". This at the moment writes "welcome" (lower case w).
How can I make the first letter upper case in the following:
${1:${TM_FILENAME/[\.php]+$//}}
Basically if the filename is "welcome.php", I'd like it to write out "Welcome". This at the moment writes "welcome" (lower case w).
For some reason the above example gives you weird charectors when using it ... it took me a while but the solution below works if you are still looking. It has two solutions here for you the first one is for actual textmate on mac:
${TM_FILENAME/(^.)(.*?)(\.php)/(?1:\U$1)(?2:)(?3:)/}
The next is if you are using e Texteditor on PC:
${TM_FILENAME/(^.)(.*?)(\.php)/(?1:)(?2:$2)(?3:)/}
I hope this helps you if you haven't already.
Try the following snippet. Works for me.