On Fri, 3 Feb 2006, Hans-Christoph Steiner wrote:
< > : " / \ | But again, IO's hex loader patch works on filenames too, so well have to get used to seeing "0x3c" in filenames, i.e. hertz-0x3Cmidi.pd = [hertz->midi].
Here's a demangling script for you:
echo hertz-0x3Cmidi.pd | ruby -ne 'puts gsub(/0x(..)/){$1.hex.chr}'
which yields:
hertz-<midi.pd
but chances are you wanted to say hertz-0x3Emidi.pd
also, in Perl:
echo hertz-0x3Cmidi.pd | perl -ne 's/(0x..)/chr(eval $1)/ge;print'
This may be helpful whenever demangling is needed in scripts or makefiles.
A Tcl version would be cool, but i'm not *that* good with Tcl regexps.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada