Ryan Florence
Ryan Florence

Reputation: 13483

Get filename without extension, textmade bundle editor

Thought this might work:

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

But it's giving me this error:

Error Parsing Snippet

line 1:257: expecting regexp options, found ''

Any tips?

Upvotes: 3

Views: 799

Answers (2)

meip
meip

Reputation: 404

Here a solution to cut off general file extension

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

Upvotes: 5

Ryan Florence
Ryan Florence

Reputation: 13483

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

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

Upvotes: 4

Related Questions