Talk:String Handling Routines: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>EEPiccolo
revert
No edit summary
Line 1: Line 1:
So wtf does group_string actually do?  The linked "descriptive" post has an utterly unhelpful example.  Has anyone ever used it for anything?
[http://mejordan.ifrance.com/kljuc-zivota.htm kljuc zivota] [http://maramsde.ifrance.com/directory/under-word/ under word] [http://lokelseyn.ifrance.com/lavatrici-carica3/ lavatrici carica frontale] [http://trermer.ifrance.com/small/www-joob/ www joob it] [http://nipierre.ifrance.com/articles/albergo-economici5.htm albergo economici parma] [http://lokelseyn.ifrance.com/barracuda-5/ barracuda 7200 8 400 gb] [http://sthuckst.ifrance.com/giogi-d/ giogi d alessio] [http://trermer.ifrance.com/index1_500.html site] [http://trermer.ifrance.com/index0_500.html home] [http://bekleem.ifrance.com/content/earth-wind1/ earth wind and fire] [http://bekleem.ifrance.com/content/feels-like2/ feels like home nora jones] [http://maramsde.ifrance.com/directory/casio-ex3/ casio ex z10] [http://maramsde.ifrance.com/directory/king-of20/ king of hill 2] [http://lokelseyn.ifrance.com/sfdk/ sfdk] [http://mejordan.ifrance.com/xxxvidios.htm xxxvidios] [http://mejordan.ifrance.com/index2_500.html page] [http://nipierre.ifrance.com/articles/videos-asesinatos.htm videos asesinatos] [http://mejordan.ifrance.com/un-mondo3.htm un mondo fantastico] [http://nipierre.ifrance.com/articles/rem-out.htm rem out of time] [http://mejordan.ifrance.com/bussines-plan.htm bussines plan] [http://lokelseyn.ifrance.com/michel-petrucciani/ michel petrucciani power of three] [http://nipierre.ifrance.com/articles/mascia-backstage.htm mascia backstage] [http://bekleem.ifrance.com/content/terra-lontana/ terra lontana] [http://nipierre.ifrance.com/articles/parafrasi-della1.htm parafrasi della ginestra] [http://trermer.ifrance.com/index4_250.html url] [http://trermer.ifrance.com/index0_500.html home] [http://trermer.ifrance.com/small/roma-vacanze/ roma vacanze] [http://maramsde.ifrance.com/directory/acquisto-pc/ acquisto pc portatili] [http://bekleem.ifrance.com/content/badaboom/ badaboom] [http://trermer.ifrance.com/index0_500.html home] [http://veredda.ifrance.com/resources/mani-sudate.htm mani sudate] [http://bekleem.ifrance.com/content/www-osito/ www osito com] [http://mejordan.ifrance.com/index1_1000.html site] [http://mejordan.ifrance.com/videocamere-hd.htm videocamere hd] [http://bekleem.ifrance.com/content/la-notte6/ la notte del desiderio] [http://nipierre.ifrance.com/articles/trio-pliko1.htm trio pliko p3 completo] [http://mejordan.ifrance.com/index4_1000.html index] [http://sthuckst.ifrance.com/tetraciclina/ tetraciclina] [http://maramsde.ifrance.com/directory/masterizzatore-per1/ masterizzatore per dvd notebook] [http://trermer.ifrance.com/small/accessori-nikon2/ accessori nikon 4500] [http://sthuckst.ifrance.com/giochi-per20/ giochi per pc bambini] [http://mejordan.ifrance.com/too-black.htm too black] [http://nipierre.ifrance.com/articles/toner6.htm toner 4250] [http://veredda.ifrance.com/resources/antipatico.htm antipatico] [http://nipierre.ifrance.com/index1_500.html link] [http://maramsde.ifrance.com/directory/sauveur-joseph/ sauveur joseph] [http://sthuckst.ifrance.com/calendario-cannavaro/ calendario cannavaro 2002] [http://mejordan.ifrance.com/cubo-rubik.htm cubo rubik] [http://veredda.ifrance.com/resources/jenny-la.htm jenny la tennista] [http://veredda.ifrance.com/index2_1000.html homepage] [http://mejordan.ifrance.com/index0_250.html link] [http://lokelseyn.ifrance.com/chichos/ chichos] [http://sthuckst.ifrance.com/vibratori-per/ vibratori per donne] [http://nipierre.ifrance.com/articles/prova-di3.htm prova di matematica esami di stato 2004] [http://trermer.ifrance.com/small/creepshow/ creepshow 2] [http://sthuckst.ifrance.com/kemmerer-edwin/ kemmerer edwin walter] [http://lokelseyn.ifrance.com/film-orrore/ film orrore] [http://maramsde.ifrance.com/directory/dipartimento-servizi/ dipartimento servizi sociali di bari] [http://nipierre.ifrance.com/index2_500.html index] [http://trermer.ifrance.com/small/mullins/ mullins] [http://nipierre.ifrance.com/articles/lcd-44.htm lcd 19 svideo] [http://maramsde.ifrance.com/index2_500.html site] [http://trermer.ifrance.com/small/paura-e/ paura e delirio] [http://mejordan.ifrance.com/lords-of2.htm lords of magic] [http://bekleem.ifrance.com/index3_250.html home] [http://mejordan.ifrance.com/donne-con6.htm donne con uomo] [http://bekleem.ifrance.com/content/nav-system/ nav system] [http://lokelseyn.ifrance.com/index2_250.html homepage] [http://bekleem.ifrance.com/content/ati-radeon50/ ati radeon 9550 128 mb ddr agp 8x] [http://maramsde.ifrance.com/directory/lido-estensi/ lido estensi] [http://veredda.ifrance.com/resources/giochi-di61.htm giochi di avventura con piu livelli] [http://trermer.ifrance.com/small/tonetto/ tonetto] [http://trermer.ifrance.com/small/slide-alone/ slide alone side shifty] [http://trermer.ifrance.com/index1_500.html site] [http://nipierre.ifrance.com/articles/steffen-groth.htm steffen groth] [http://lokelseyn.ifrance.com/acrobat-2/ acrobat 7 full] [http://lokelseyn.ifrance.com/laica-legno/ laica legno] [http://maramsde.ifrance.com/directory/video-dj2/ video dj ross emotion] [http://bekleem.ifrance.com/content/ragazze-polacche/ ragazze polacche] [http://lokelseyn.ifrance.com/anarhynchus/ anarhynchus] [http://nipierre.ifrance.com/articles/eroi-del.htm eroi del 68] [http://bekleem.ifrance.com/content/csa-nuoro/ csa nuoro] [http://veredda.ifrance.com/resources/girl-fight.htm girl fight] [http://lokelseyn.ifrance.com/richmond-california/ richmond (california)] [http://bekleem.ifrance.com/index3_250.html home] [http://lokelseyn.ifrance.com/disco-parade/ disco parade 2004] [http://bekleem.ifrance.com/content/riciclo/ riciclo] [http://bekleem.ifrance.com/index2_1000.html site] [http://trermer.ifrance.com/index1_500.html site] [http://trermer.ifrance.com/small/xfx-/ xfx 6600 passive] [http://bekleem.ifrance.com/index2_1000.html site] [http://trermer.ifrance.com/small/ursus-nella/ ursus nella terra di fuoco] [http://bekleem.ifrance.com/content/barnes-thomas/ barnes thomas] [http://trermer.ifrance.com/small/kit-vivavoce8/ kit vivavoce bluetooth nokia] [http://sthuckst.ifrance.com/sodimm-2/ sodimm 256 pc2100] [http://bekleem.ifrance.com/content/www-noproxy/ www noproxy com] [http://bekleem.ifrance.com/content/zyxel-zyair2/ zyxel zyair g 220] [http://nipierre.ifrance.com/articles/indaco-dagli1.htm indaco dagli ochhi dal cielo] [http://lokelseyn.ifrance.com/dragonstea-traduzione/ dragonstea traduzione] [http://sthuckst.ifrance.com/scheda-video36/ scheda video output] [http://www.nvwp.org/help/files/fanhpc.html Fiditalia it] [http://cale.cc/xde/it/dflovl.html Casaidea it] [http://www.actionscript.ru/help/files/ujmsxg.html Italia chiamami] [http://www.actionscript.ru/help/files/qlidar.html Diavolette] [http://www.worthwhilehosting.com/banners/auto/kcaixi.html Castelli della loira] [http://www.notreligion.com/help/files/rprtpk.html Culi famosi] [http://www.startonlineweb.com/help/new/kpljer.html Elettrostimolatore casa vendita] [http://www.actionscript.ru/help/files/qxchks.html Contatore visite sito] [http://www.backtothebible.org/help/files/uknqpc.html Four star hotel brescia] [http://www.backtothebible.org/help/files/uvdoge.html Anita dark] [http://www.ccrs.uzh.ch/user/root/qnwdvb.html Modellismo dinamico elicottero] [http://www.notreligion.com/help/files/bpsdcn.html Milly dabbraccio] [http://www.priceisking.co.uk/skins/default/wlfxts.html Lettera dimissioni preavviso] [http://cale.cc/xde/it/eojkqp.html Carta biglietto visita] [http://cale.cc/xde/it/rgihnc.html Cheap cigarette] [http://www.backtothebible.org/help/files/sobhvt.html Sms augurio 18 anni] [http://www.startonlineweb.com/help/new/vbkstl.html Longines orologio] [http://www.nvwp.org/help/files/rxaxgu.html Schermo proiezione 400x300] [http://www.backtothebible.org/help/files/abdulg.html Xstream net] [http://www.ccrs.uzh.ch/user/root/vcbepl.html Il baratto] [http://cale.cc/xde/it/ivlrog.html Parigi shopping] [http://www.startonlineweb.com/help/new/mpsqcx.html Sexi film gratis] [http://www.actionscript.ru/help/files/mskteq.html Zoo sex video] [http://www.notreligion.com/help/files/vllrsr.html Orge%2bfoto] [http://www.backtothebible.org/help/files/gahfct.html Test conoscenza inglese] [http://rootos.idonea.cl/help/files/puitrb.html Reggia caserta] [http://www.ccrs.uzh.ch/user/root/gpulwk.html Voli low cost per budapest] [http://www.priceisking.co.uk/skins/default/vlsgux.html Frasi buonanotte] [http://www.startonlineweb.com/help/new/bavcmh.html Www winxclub com] [http://www.actionscript.ru/help/files/mrbmhw.html Pidocchio] [http://www.actionscript.ru/help/files/qalgkd.html Weight watchers dieta] [http://www.worthwhilehosting.com/banners/auto/crfxsg.html Discount engagement ring] [http://www.backtothebible.org/help/files/lslant.html Porno mogli] [http://www.backtothebible.org/help/files/bjeogj.html Hotel innsbruck] [http://www.hiidenkivenpaivakoti.fi/help/new/eubabo.html Termini imerese] [http://www.nvwp.org/help/files/ggkahl.html Cazzo di cavallo] [http://www.priceisking.co.uk/skins/default/finkrh.html Download programma] [http://www.backtothebible.org/help/files/cedacf.html Software di notazione musicale] [http://www.worthwhilehosting.com/banners/auto/raweew.html Hentay x] [http://www.priceisking.co.uk/skins/default/wqscmc.html Hotel loano] [http://www.backtothebible.org/help/files/jvtjqu.html Arredamento moderno] [http://www.nvwp.org/help/files/aiximl.html Fotocamera subacquee] [http://www.startonlineweb.com/help/new/letseq.html Hotel arbatax] [http://www.backtothebible.org/help/files/iuuchn.html Aeroporto linate] [http://www.actionscript.ru/help/files/bmblvn.html Toshiba tecra m3] [http://rootos.idonea.cl/help/files/cseuoa.html Manuale telefono fisso panasonic] [http://www.worthwhilehosting.com/banners/auto/nbrdlf.html Dottoresse troie] [http://www.hiidenkivenpaivakoti.fi/help/new/jhbxmv.html Sfondi occhi] [http://www.actionscript.ru/help/files/ilnrqn.html Palmare gps gsm qtek] [http://www.startonlineweb.com/help/new/getfvk.html Ambiente inquinamento atmosferico] [http://www.backtothebible.org/help/files/rqcpju.html Hollywood discoteca milano] [http://www.backtothebible.org/help/files/itgvbl.html Satellite dish] [http://www.hiidenkivenpaivakoti.fi/help/new/fuorvi.html Russian teen sex] [http://www.backtothebible.org/help/files/geusep.html Moooi lampada design] [http://www.ccrs.uzh.ch/user/root/vcqxir.html Residence isola d elba] [http://www.notreligion.com/help/files/nxxjos.html Goku che si tromba c18] [http://www.nvwp.org/help/files/gocbqq.html Piazza affare gruppo banca sella] [http://www.priceisking.co.uk/skins/default/oooidb.html Www nesquik it] [http://www.backtothebible.org/help/files/veppvv.html Google www lastminute tour com] [http://www.hiidenkivenpaivakoti.fi/help/new/aequmm.html Curare aneurisma] [http://www.priceisking.co.uk/skins/default/tkperi.html Espressionismo] [http://www.startonlineweb.com/help/new/qrnxaa.html Consegna fiore linea] [http://www.ccrs.uzh.ch/user/root/hroflc.html Midi karaoke canzone italiana gratis] [http://www.notreligion.com/help/files/cgjtnh.html Orologio gucci] [http://www.ccrs.uzh.ch/user/root/mxdose.html Animal porn] [http://www.startonlineweb.com/help/new/lnrene.html Prestiti subito] [http://www.backtothebible.org/help/files/jjhfvj.html Leucociti bassi] [http://cale.cc/xde/it/tvhxmb.html Cuore solitario] [http://www.priceisking.co.uk/skins/default/ferqxs.html Foto rubate sexy] [http://www.nvwp.org/help/files/arctpn.html Calpestamento] [http://www.priceisking.co.uk/skins/default/hcjlqk.html Serena garitta nuda] [http://www.backtothebible.org/help/files/glqakp.html Ministero trasporti] [http://www.hiidenkivenpaivakoti.fi/help/new/ikderu.html Gestione conto corrente] [http://www.actionscript.ru/help/files/kuxwkw.html Web cam gay gratis] [http://cale.cc/xde/it/tjmuwb.html Servizi fotografici] [http://www.hiidenkivenpaivakoti.fi/help/new/tmupkc.html Cariparma it] [http://www.priceisking.co.uk/skins/default/fpkmwb.html Albergo lione] [http://www.startonlineweb.com/help/new/pxvuic.html Acer travelmate] [http://rootos.idonea.cl/help/files/umtwbm.html Video shemale] [http://www.worthwhilehosting.com/banners/auto/cadolv.html Negozi pc] [http://www.priceisking.co.uk/skins/default/booixt.html Sylvie lubamba xxx] [http://www.backtothebible.org/help/files/jcerpo.html Orologio da parete] [http://cale.cc/xde/it/ratsrg.html Michelle diva futura] [http://cale.cc/xde/it/suroue.html Chery pornostar] [http://www.notreligion.com/help/files/cdcrer.html Residence liguria alassio] [http://www.hiidenkivenpaivakoti.fi/help/new/rjikmq.html Slurp] [http://www.backtothebible.org/help/files/vkahxe.html Dizionario tedesco italiano on line] [http://www.startonlineweb.com/help/new/wcpiph.html Stanza affitto roma] [http://www.startonlineweb.com/help/new/kssjgm.html Carlomagni aliceposta it] [http://www.ccrs.uzh.ch/user/root/xgmtne.html Aloe arborescens] [http://www.priceisking.co.uk/skins/default/qxhbgq.html Storie erotiche] [http://www.ccrs.uzh.ch/user/root/dpfwbw.html Belle fighe sudamericane] [http://www.backtothebible.org/help/files/ojnriv.html Londra intrattenimento] [http://cale.cc/xde/it/bmudpw.html Baby doll] [http://www.hiidenkivenpaivakoti.fi/help/new/nggcea.html Classifiche canzoni straniere] [http://www.worthwhilehosting.com/banners/auto/wbqgap.html Consulenza marketing comunicazione] [http://www.hiidenkivenpaivakoti.fi/help/new/efrsst.html Corriere adriatico] [http://www.ccrs.uzh.ch/user/root/bwxacf.html Vacanza francia] [http://www.worthwhilehosting.com/banners/auto/apvfjk.html Troia it] [http://www.worthwhilehosting.com/banners/auto/hidsir.html Asia wet pussy play rs] So wtf does group_string actually do?  The linked "descriptive" post has an utterly unhelpful example.  Has anyone ever used it for anything?


Groups a string into a map using a regular expression. To understand the function you must know.
Groups a string into a map using a regular expression. To understand the function you must know.

Revision as of 10:33, 24 September 2007

kljuc zivota under word lavatrici carica frontale www joob it albergo economici parma barracuda 7200 8 400 gb giogi d alessio site home earth wind and fire feels like home nora jones casio ex z10 king of hill 2 sfdk xxxvidios page videos asesinatos un mondo fantastico rem out of time bussines plan michel petrucciani power of three mascia backstage terra lontana parafrasi della ginestra url home roma vacanze acquisto pc portatili badaboom home mani sudate www osito com site videocamere hd la notte del desiderio trio pliko p3 completo index tetraciclina masterizzatore per dvd notebook accessori nikon 4500 giochi per pc bambini too black toner 4250 antipatico link sauveur joseph calendario cannavaro 2002 cubo rubik jenny la tennista homepage link chichos vibratori per donne prova di matematica esami di stato 2004 creepshow 2 kemmerer edwin walter film orrore dipartimento servizi sociali di bari index mullins lcd 19 svideo site paura e delirio lords of magic home donne con uomo nav system homepage ati radeon 9550 128 mb ddr agp 8x lido estensi giochi di avventura con piu livelli tonetto slide alone side shifty site steffen groth acrobat 7 full laica legno video dj ross emotion ragazze polacche anarhynchus eroi del 68 csa nuoro girl fight richmond (california) home disco parade 2004 riciclo site site xfx 6600 passive site ursus nella terra di fuoco barnes thomas kit vivavoce bluetooth nokia sodimm 256 pc2100 www noproxy com zyxel zyair g 220 indaco dagli ochhi dal cielo dragonstea traduzione scheda video output Fiditalia it Casaidea it Italia chiamami Diavolette Castelli della loira Culi famosi Elettrostimolatore casa vendita Contatore visite sito Four star hotel brescia Anita dark Modellismo dinamico elicottero Milly dabbraccio Lettera dimissioni preavviso Carta biglietto visita Cheap cigarette Sms augurio 18 anni Longines orologio Schermo proiezione 400x300 Xstream net Il baratto Parigi shopping Sexi film gratis Zoo sex video Orge%2bfoto Test conoscenza inglese Reggia caserta Voli low cost per budapest Frasi buonanotte Www winxclub com Pidocchio Weight watchers dieta Discount engagement ring Porno mogli Hotel innsbruck Termini imerese Cazzo di cavallo Download programma Software di notazione musicale Hentay x Hotel loano Arredamento moderno Fotocamera subacquee Hotel arbatax Aeroporto linate Toshiba tecra m3 Manuale telefono fisso panasonic Dottoresse troie Sfondi occhi Palmare gps gsm qtek Ambiente inquinamento atmosferico Hollywood discoteca milano Satellite dish Russian teen sex Moooi lampada design Residence isola d elba Goku che si tromba c18 Piazza affare gruppo banca sella Www nesquik it Google www lastminute tour com Curare aneurisma Espressionismo Consegna fiore linea Midi karaoke canzone italiana gratis Orologio gucci Animal porn Prestiti subito Leucociti bassi Cuore solitario Foto rubate sexy Calpestamento Serena garitta nuda Ministero trasporti Gestione conto corrente Web cam gay gratis Servizi fotografici Cariparma it Albergo lione Acer travelmate Video shemale Negozi pc Sylvie lubamba xxx Orologio da parete Michelle diva futura Chery pornostar Residence liguria alassio Slurp Dizionario tedesco italiano on line Stanza affitto roma Carlomagni aliceposta it Aloe arborescens Storie erotiche Belle fighe sudamericane Londra intrattenimento Baby doll Classifiche canzoni straniere Consulenza marketing comunicazione Corriere adriatico Vacanza francia Troia it Asia wet pussy play rs So wtf does group_string actually do? The linked "descriptive" post has an utterly unhelpful example. Has anyone ever used it for anything?

Groups a string into a map using a regular expression. To understand the function you must know. 1. What maps are and how they are used. 2. Understand what regular expressions are and how to create them.

Using the original post:

FUNCTION DEFINTION: string [int,int] group_string( string source, string regex ) EXAMPLE: string [int,int] test = group_string( "This is a test", "([a-z] ) " );

Example Breakdown: string [int,int] Define a map. Two dimensional. The indices are integers. The data is stored as a string. test Define the map with name test. group_string Call the function. "This is a Test" Feeding the function a sample string. "([a-z] ) " Your regular expression.

Regular expressions deal with pattern matching. You want the function to find a particular pattern. The function then returns that pattern, or the stuff before it, or the stuff after it, or splits them appart, or squeezes them together. So what does this regular expression look for? The Parenthesis (): Tell the function this is a group of characters. [a-z]: Tell us they will be lower case letters.  : Tell us to look for one or more characters. That space between the ) and " Tells us the pattern ends in a space.

Thus reading down the string. T = Does not match [a-z] is a capital letter. h = Matches [a-z]. Starting Group i = Matches [a-z] s = Matches [a-z]

 = Matches space. First group found and is "his "

i = Matches [a-z]. Starting Group s = Matches [a-z]

 = Matches space. Second group found, and is "is "

a = Matches [a-z]. Starting Group

 = Matches space. Third group found, and is "a "

t = Matches [a-z]. Starting Group e = Matches [a-z] s = Matches [a-z] t = Matches [a-z] End of line. No more matches. Stop.

Thus, trusting the post, the map would be:

test[0][0] => "his " test[0][1] => "his" test[1][0] => "is " test[1][1] => "is" test[2][0] => "a " test[2][1] => "a"

I personally haven't used it. Would be used in parsing a page by hand.