I’ve got a problem that to my mind should be kind simply to fix but after hours of searching can’t find anything.
Basically, my patch reads ID3 Tag data from an XML file, and splits it into individual lines that read like:
Is there anyway to get rid of the
Failing that is there a way it can be converted into numbers, something like unicode. As it’s use eventually will be to query a database.
Any tips would be great, cheers.
regexp should do the trick:
----------begin_max5_patcher---------- 528.3ocyVFsaaBCEF9Z3ovxWsMk1XaHEXJZRqOBS8topImvoIdBLQXmN1p56 9.aSZRT5FMPX6B.cN19vgO++C7juGdQQEnvnOh9Jxy6IeOOSplDdtXObNuZY FWYlFNGTJ9J.OwN1CERsR7KnYLJ4ZhKsbatPlAZyZXtjaJAEH0bsnP9sRXo1 deChhpWGhxRZtPbmP2+RoJ1paqEssVb8x0B4pCpyM15D2bI1FbydUxVF8O2. 1Efw6FRjZd3JV78qnj8e1j7byrwetTvyP2VjkhaF8Ye+lSS5H0jvOpqcag0P komwkvJnZCZtVT2Ye5cW+g2Oe5agrzSxnYuNiBoFrDaPThk6w+QDM4niShL5 E.YGIz1wLGrtiWkykymZiFP4XH0fkff9oFcjNfYXLI4bUirKOZG.nQSbdun9 QMFgLDd3nw2ByyVrMeLrvrPxKV3VgU+8vwioE1Bqu.OVj8HTNepMd.0ir.q6 i1S4nk0NSbP7YJGS9+xC28unxFBy3r+AlwRsPoGC2XDaeyX3.YFCFUynEV2s FP2B751UUaHs4tnpKK5bZrP1YptdKeezrdblPd7u7Z5tl7GxOUw1xks281ez AQ20FofRKjl28r+jHGLo0hzTvLdK1xEoaJDRsqIP2excyN2S0D.Q9a8D8fIc o6o3NfonQkRIc.RwiJi5x1Vvn1QAcXWaVO10pCd1+2fxRuk1 -----------end_max5_patcher-----------
Not sure if it is of interest to you, but Jeremy Bernstein made a nice object for reading id3 tags, metatag:
Cheers Ben, that’s exactly what I wanted, just hadn’t got round to learning the regexp syntax.
Will also check out Jeremy Bernstein’s object, looks very relevant to my project.
Yeah, its a bit of a beast.
As far as learning the regexp syntax, here are a few useful ref links:
There are some nifty tutorials out there too. I remember reading through this one and finding it useful:
there’s also tap.xml.sax from Electrotap’s Tap.Tools objects, which saves having to learn any regexp and also maintains structure…