hi, "filename" should be assigned to the name of your podcast beforehand, so that the string.extract function has something to work on. David's example extracts any number x from a filename that looks like "podcast x.mp3".
xavier. On Monday, June 20, 2011, Mix Dance <[email protected]> wrote: > Le 20/06/2011 21:21, Romain Beauxis a écrit : >> Le 20 juin 2011 11:22, Mix Dance<[email protected]> a écrit : >>> Hi! >> Hi! >> >>> If the name of my podcast is "podcast 32.mp3", i must use this example? >> >> If you want to extract the number, you only need to use string.extract: >> ret = string.extract(pattern="podcast\s([0-9]+).mp3", filename) >> number = ret["1"] >> >> Romain >> >>> def url.split(uri) = >>> >>> ret = string.extract(pattern="#podcast ({0-9}+).mp3$#,uri) >>> >>> args = ret["2"] >>> >>> if args != "" then >>> >>> l = string.split(separator="&",args) >>> >>> def f(x) = >>> >>> ret = string.split(separator="=",x) >>> >>> (url.decode(list.nth(ret,0)), >>> >>> url.decode(list.nth(ret,1))) >>> >>> end >>> >>> l = list.map(f,l) >>> >>> (ret["1"],l) >>> >>> else >>> >>> (uri,[]) >>> >>> end >>> >>> end >>> >>> But how recover the name of the file in play progress? >>> Thanks >>> >>> Antoine >>> > Hi > > I have try tour example but i have an error: > > At line 54, char 59: unbound symbol filename > > The line 54 is: > > ret = string.extract(pattern="podcast ([0-9]+).mp3", filename) > > I think the variable doesn't exist but i don't know what is the good > variable > > Thanks > > Antoine > > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users > -- Xavier Cazin <[email protected]> immatériel·fr — R.C.S. Paris 509 139 937 http://immateriel.fr — Skype : immateriel.fr Mobile: +33 6 06 54 55 65 — Phone: +33 1 48 05 16 88 ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
