[PD] regular expressions (symbol splitting)

Andrew (Andy) W. Schmeder andy at eh2o.ws
Thu Feb 28 22:14:39 CET 2002


I came up with a need to use regular expressions.
In my case my goal was to get the just the filename from a full path.

Here is my hack;

------------
#!/usr/bin/perl

$_ = $ARGV[0];

$_ =~ s|^.*/([^/]*)$|$1|;
print $_;
------------

Simply invoke the script via PD using 

...
 |
[/home/me/pd/filename.pl $1(
 |
[shell]
 |
[pack s]
 |
...



andy



More information about the Pd-list mailing list