Hi,
I want to create a snippet which takes takes the filename, removes the extension and converts the remaining string to uppercase, i.e. "filename.txt" -> "FILENAME".
So far I have ended up with
${TM_FILENAME/(.*)[.](.*)/\u$1/g},
but the \u only converts the first character of the string to uppercase, i.e. I get "Filename". Is there any way to convert the whole string to uppercase?
Regards,
Carsten
Hi,
On Sep 24, 2013, at 9:50 AM, Carsten Hoever wrote:
I want to create a snippet which takes takes the filename, removes the extension and converts the remaining string to uppercase, i.e. "filename.txt" -> "FILENAME".
So far I have ended up with
${TM_FILENAME/(.*)[.](.*)/\u$1/g},
try:
${TM_FILENAME/(.*)[.](.*)/\U$1/}
Cheers, Hans
****************************************************** Hans-Joerg Bibiko Max Planck Institute for Evolutionary Anthropology Department of Linguistics Deutscher Platz 6 phone: +49 (0) 341 3550 341 D-04103 Leipzig fax: +49 (0) 341 3550 333 Germany e-mail: bibiko [at] eva.mpg.de ******************************************************