开发者

Get filename without extension, textmade bundle editor

开发者 https://www.devze.com 2022-12-09 14:01 出处:网络
Thought this might work: ${TM_FILENAME/(.+?)(\\.[^.]*$|$)/} But it\'s giving me this error: Error Parsing Snippet

Thought this might work:

${TM_FILENAME/(.+?)(\.[^.]*$|$)/}

But it's giving me this error:

Error Parsing Snippet

line 1:257: expecting regexp options, fou开发者_StackOverflow社区nd ''

Any tips?


Here a solution to cut off general file extension

${TM_FILENAME/(.*)[.](.*)/$1/g}


My original goal was to get rid of the .js extension, and this works like a charm.

${TM_FILENAME/[\.js]+$//}
0

精彩评论

暂无评论...
验证码 换一张
取 消