-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
marios wrote:
I have a case, where I would like to retain the Directory Name of the File being dropped.
In that case, the TM_DROPPED_FILEPATH variable has the following value:
/Users/username/Sites/siteroot/public_html/textpattern/_templates/articles/article/60.an-example-article.txaml
I want to retain the last directory name, in this case: article.
I tried :
section=`echo $TM_DROPPED_FILE_PATH | perl -pe 's/(.*)?(/)(\w+)(/)([\d+]+)(.)(.*)$/$3/g'` echo "$section"
But the variable doesn't echo anything.
I tested the replacement pattern with find and replace and it gives me what I want.
What am I doing wrong here ?
Any help appreciated.
regards, marios
Just realized the silly typo, so void for the above question. Sorry again.
regards, marios ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate