Strings

Jul 23, 2009 at 12:33pm

Strings

I am using a dropfile to open samples which is working fine.

What I’d also like is for the filepath to be modified so that it remains entirely the same, bar the extension, which is replaced by some characters I have not yet decided.

I’ve been looking around for ways to do this but can’t find anything, could somebody point me in the right direction?

Thanks

#44850
Jul 23, 2009 at 1:37pm

use regexp

some examples gleaned from the forum:

– Pasted Max Patch, click to expand. –
#161468
Jul 23, 2009 at 6:43pm

Off the top of my head something like this should do the trick, just replace the “abc” with whatever you want the extension to be.

[regexp (.+?\.)([^.]+)$ @substitute %1abc @tosymbol 1]

lh

#161469

You must be logged in to reply to this topic.