Talk:String Handling Routines: Difference between revisions
No edit summary |
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://kaygigi.50webs.com/articles/hotel-lourdes/ hotel lourdes] [http://howquickly.50webs.com/articles/somewher-over.htm somewher over the rainbow] [http://tigerlilly2063.50webs.com/lavastoviglie-a1/ lavastoviglie a scomparsa totale] [http://howquickly.50webs.com/articles/lupo1.htm lupo 1000] [http://starbestfik.50webs.com/topic/cartolina-elettroniche1/ cartolina elettroniche per bambini] [http://ryolove.50webs.com/resources/fabbrica-attrezzature.htm fabbrica attrezzature congressi] [http://exlerrss.50webs.com/text/roma-non1.htm roma non fa la stupida stasera] [http://brittpach7.50webs.com/text/magik-key.htm magik key] [http://tigerlilly2063.50webs.com/appunto-ragioneria/ appunto ragioneria] [http://gekijuls.50webs.com/resources/cucina-ricetta.htm cucina ricetta] [http://kaygigi.50webs.com/articles/traghetti-sardegna/ traghetti sardegna navi tirrenia] [http://kaygigi.50webs.com/articles/zelda-memory/ zelda memory] [http://kaygigi.50webs.com/articles/noleggio-auto3/ noleggio auto torino] [http://anetaspb.50webs.com/content/milan-foto.htm milan foto ai giocatori 88] [http://ryolove.50webs.com/resources/brescia-rosella.htm brescia rosella] [http://devthemagister.50webs.com/web/i-blieve.htm i blieve i can fly] [http://terrastaoid.50webs.com/resources/falam/ falam] [http://anetaspb.50webs.com/content/giocatori-svincolati.htm giocatori svincolati dell atalanta] [http://ir4ik.50webs.com/view/www-marcopoloshop.htm www marcopoloshop it] [http://kruppkw.50webs.com/new/musiche-scozzesi/ musiche scozzesi] [http://anetaspb.50webs.com/content/video-modella.htm video modella] [http://starbestfik.50webs.com/topic/once-upon1/ once upon a time a december] [http://brittpach7.50webs.com/text/vibratore-devastante.htm vibratore devastante] [http://devthemagister.50webs.com/web/plymouth-uni.htm plymouth uni] [http://anetaspb.50webs.com/content/razze-bovine.htm razze bovine] [http://bookishfellow.50webs.com/new/piatto-batteria.htm piatto batteria] [http://levplatonov.50webs.com/content/gabicce-mare/ gabicce mare] [http://sneezingpops.50webs.com/blog/monitor-lcd22/ monitor lcd 20 1] [http://dragonchan.50webs.com/description/radio-sveglia1/ radio sveglia proiezione] [http://tigerlilly2063.50webs.com/ludmilla-nuda/ ludmilla nuda] [http://pulema.50webs.com/resources/film-il1/ film il merlo maschio] [http://brittpach7.50webs.com/text/lettore-mp58.htm lettore mp3 thomson] [http://ryolove.50webs.com/resources/mino-reitano.htm mino reitano] [http://gekijuls.50webs.com/resources/franchising-online.htm franchising online] [http://terrastaoid.50webs.com/resources/scansione-on/ scansione on line] [http://terrastaoid.50webs.com/resources/fondotinta-pelli/ fondotinta pelli grasse] [http://kruppkw.50webs.com/new/amour-denfance/ amour denfance] [http://devthemagister.50webs.com/web/giradischi-denon.htm giradischi denon dp] [http://exlerrss.50webs.com/text/mp-usb3.htm mp3 usb player 1 gb] [http://devthemagister.50webs.com/web/storia-e.htm storia e pensiero di jean piaget] [http://pulema.50webs.com/resources/tatoo-foto/ tatoo foto gratis] [http://bookishfellow.50webs.com/new/gloria-constantino.htm gloria constantino perez] [http://brittpach7.50webs.com/text/sony-14.htm sony kep42mrx1] [http://gekijuls.50webs.com/resources/ciao-amico1.htm ciao amico] [http://anetaspb.50webs.com/content/dester.htm dester] [http://iguanalady.50webs.com/plotter-hp2.htm plotter hp 500 a1] [http://ir4ik.50webs.com/view/modem-adsl11.htm modem adsl con interfaccia usb e] [http://bookishfellow.50webs.com/new/esibiz.htm esibiz] [http://ir4ik.50webs.com/view/mutuo-case.htm mutuo case rate] [http://terrastaoid.50webs.com/resources/frasidamore/ frasidamore] [http://kaygigi.50webs.com/articles/tito/ tito] [http://levplatonov.50webs.com/content/eurosk/ eurosk] [http://pulema.50webs.com/resources/www-muyzorras/ www muyzorras com] [http://pulema.50webs.com/resources/feel-feel/ feel feel] [http://sneezingpops.50webs.com/blog/negozi-sport/ negozi sport] [http://kaygigi.50webs.com/articles/wwww-mappy/ wwww mappy com] [http://kaygigi.50webs.com/articles/video-jeanne/ video jeanne tripplehorn] [http://starbestfik.50webs.com/topic/volkova/ volkova] [http://exlerrss.50webs.com/text/versione-cornelio.htm versione cornelio nepote] [http://tigerlilly2063.50webs.com/cinque-ore/ cinque ore in contanti] [http://levplatonov.50webs.com/content/child-development/ child development] [http://cheburashka21.50webs.com/html/camerette/ camerette] [http://kruppkw.50webs.com/new/movenpick-sharm/ movenpick sharm] [http://kaygigi.50webs.com/articles/hercules-fortissimo/ hercules fortissimo iv] [http://howquickly.50webs.com/articles/auricolare-nokia.htm auricolare nokia] [http://brittpach7.50webs.com/text/extreme-d.htm extreme 3d] [http://gekijuls.50webs.com/resources/wesling.htm wesling] [http://levplatonov.50webs.com/content/hey-ho/ hey ho lets go] [http://kaygigi.50webs.com/articles/www-maria1/ www maria de filipppi] [http://dragonchan.50webs.com/description/bluetooth-nokia/ bluetooth nokia 6680 auricolare] [http://dragonchan.50webs.com/description/galattica-autostoppisti/ galattica autostoppisti] [http://sneezingpops.50webs.com/blog/www-itelefonica/ www itelefonica com br] [http://ir4ik.50webs.com/view/mina-canta.htm mina canta battisti] [http://kruppkw.50webs.com/new/duble-dragon/ duble dragon] [http://dragonchan.50webs.com/description/gunman-chronicles/ gunman chronicles] [http://dragonchan.50webs.com/description/canon5/ canon 20 35] [http://levplatonov.50webs.com/content/file-modem/ file modem lucent] [http://devthemagister.50webs.com/web/philips-s1.htm philips 190s5 lcd] [http://exlerrss.50webs.com/text/fx3.htm fx 1050] [http://anetaspb.50webs.com/content/mole.htm mole] [http://terrastaoid.50webs.com/resources/mashall/ mashall] [http://terrastaoid.50webs.com/resources/settimana-bianche/ settimana bianche last minute] [http://pulema.50webs.com/resources/barbaresco-il/ barbaresco il bricco] [http://kaygigi.50webs.com/articles/minya-el/ minya el] [http://bookishfellow.50webs.com/new/lg-dvd4.htm lg dvd recorder dr 7400] [http://iguanalady.50webs.com/on-to.htm on to victory] [http://brittpach7.50webs.com/text/storia-di7.htm storia di sanremo] [http://tigerlilly2063.50webs.com/eli/ eli 77] [http://iguanalady.50webs.com/becher-johannes.htm becher johannes robert] [http://levplatonov.50webs.com/content/trova-il/ trova il testo di where is the love] [http://bookishfellow.50webs.com/new/batteria-creative.htm batteria creative] [http://pulema.50webs.com/resources/ritorno-alla/ ritorno alla laguna blu] [http://iguanalady.50webs.com/raccconti-di.htm raccconti di travestiti] [http://pulema.50webs.com/resources/full-monty/ full monty you sexy thing mp3] [http://sneezingpops.50webs.com/blog/vendesi-runner/ vendesi runner 125] [http://sneezingpops.50webs.com/blog/viacces/ viacces] [http://terrastaoid.50webs.com/resources/sms-da/ sms da inviare gratis] [http://brittpach7.50webs.com/text/addobbo-floreale.htm addobbo floreale] [http://pulema.50webs.com/resources/la-bocca/ la bocca] [http://cheburashka21.50webs.com/html/indesit/ indesit 35] [http://miraxcaorran.freehostia.com/lib/rock-nacional.htm rock nacional] [http://assaharp.freehostia.com/html/lettera-a1.htm lettera a breznev] [http://disexat.freehostia.com/articles/fiat-grande2/ fiat grande punto 1 3] [http://usverag-ekb.freehostia.com/small/in-a1/ in a while] [http://ms-beaeblebrox.freehostia.com/html/caldaia-legna.htm caldaia legna] [http://crackoaon.freehostia.com/Casalinghe-in1/ casalinghe in chatt] [http://macahi-neko.freehostia.com/valutare-auto/ valutare auto usata] [http://crackoaon.freehostia.com/paolo-pietrangeli/ paolo pietrangeli] [http://lesh1a1.freehostia.com/data/olimpiad.htm olimpiad] [http://ms-beaeblebrox.freehostia.com/html/spartiti-nelly.htm spartiti nelly furtado] [http://disexat.freehostia.com/articles/produzione-maglietta/ produzione maglietta] [http://lesh1a1.freehostia.com/data/ti-penso1.htm ti penso sempre] [http://assaharp.freehostia.com/html/lost-and.htm lost and found] [http://usverag-ekb.freehostia.com/small/vedelago/ vedelago] [http://ms-beaeblebrox.freehostia.com/html/fzs-fazer.htm fzs fazer] [http://macahi-neko.freehostia.com/trellian/ trellian] [http://miraxcaorran.freehostia.com/lib/disco-esterno2.htm disco esterno portatile] [http://juli8a.freehostia.com/new/nec-gx.htm nec 1770gx] [http://junkland-raed.freehostia.com/styles/kontra.htm kontra] [http://deathrays.freehostia.com/new/new-york22.htm new york newyork] [http://kieloida.freehostia.com/library/veneziano/ veneziano] [http://macahi-neko.freehostia.com/le-piccole/ le piccole ore] [http://chistoasya.freehostia.com/topic/grasse-taranto/ grasse taranto] [http://kieloida.freehostia.com/library/prestazioni-occasionali1/ prestazioni occasionali sesso] [http://juli8a.freehostia.com/new/i-neonati.htm i neonati foto] [http://kynaon.freehostia.com/library/ricoh-aficio13/ ricoh aficio 450] [http://juli8a.freehostia.com/new/trelew.htm trelew] [http://knave-aof-clubs.freehostia.com/view/reti-doghe1/ reti doghe legno] [http://juli8a.freehostia.com/new/foto-manuela1.htm foto manuela arcuri nuda] [http://macahi-neko.freehostia.com/atoll-ancona/ atoll ancona] [http://juli8a.freehostia.com/new/project-gotham1.htm project gotham] [http://paleshaadow.freehostia.com/text/smuji.htm smuji] [http://kynaon.freehostia.com/library/hitachi-10/ hitachi 32 pd5200] [http://geneocide.freehostia.com/lib/anno-2.htm anno 2118 progetto x] [http://kynaon.freehostia.com/library/testo-e10/ testo e traduzione modern times j five] [http://usverag-ekb.freehostia.com/small/www-laburra/ www laburra com] [http://ptisaa-jill.freehostia.com/cheap-flights/ cheap flights] [http://macahi-neko.freehostia.com/rca-vga/ rca vga accessori audio video] [http://disexat.freehostia.com/articles/goodnight-gigi/ goodnight gigi s] [http://junkland-raed.freehostia.com/styles/cdrom.htm cdrom] [http://knave-aof-clubs.freehostia.com/view/game-boy19/ game boy adbance] [http://usverag-ekb.freehostia.com/small/el-pam/ el pam pam] [http://kieloida.freehostia.com/library/vino-da/ vino da tavola] [http://ms-beaeblebrox.freehostia.com/html/superdotati-di.htm superdotati di colore] [http://knave-aof-clubs.freehostia.com/view/s-magician/ s100 magician] [http://juli8a.freehostia.com/new/brevetto-sui.htm brevetto sui farm] [http://zankoaku-zen.freehostia.com/lib/nuove-immagini43.htm nuove immagini di tomb raider legend] [http://mysteaaricafende.freehostia.com/dvd-live/ dvd live genesis] [http://deathrays.freehostia.com/new/annunci-erotici5.htm annunci erotici gratuiti per adulti] [http://deathrays.freehostia.com/new/gioielli-in3.htm gioielli in argento e pietre] [http://ptisaa-jill.freehostia.com/bluetooth-cellulare/ bluetooth cellulare] [http://lesh1a1.freehostia.com/data/need-for8.htm need for speed underground ps2] [http://macahi-neko.freehostia.com/patti-labelle/ patti labelle] [http://ptisaa-jill.freehostia.com/https-proxify/ https proxify net] [http://mysteaaricafende.freehostia.com/singing-in/ singing in the rain] [http://ms-beaeblebrox.freehostia.com/html/anelli-da2.htm anelli da donna oro e diamanti] [http://knave-aof-clubs.freehostia.com/view/biglietti-di8/ biglietti di ringraziamento] [http://crackoaon.freehostia.com/oum-el/ oum el bouaghi (wilaya)] [http://geneocide.freehostia.com/lib/rhum-zacapa.htm rhum zacapa] [http://usverag-ekb.freehostia.com/small/stampante-laser44/ stampante laser hp 3700] [http://assaharp.freehostia.com/html/ludove-piesne.htm ludove piesne] [http://knave-aof-clubs.freehostia.com/view/fare-un/ fare un pompino] [http://kynaon.freehostia.com/library/www-planeta/ www planeta com pe] [http://geneocide.freehostia.com/lib/per-qualche2.htm per qualche dollaro in meno] [http://zankoaku-zen.freehostia.com/lib/sharmelsheik-com.htm sharmelsheik com] [http://kieloida.freehostia.com/library/diff/ diff] [http://usverag-ekb.freehostia.com/small/giorl/ giorl] [http://mysteaaricafende.freehostia.com/Offerta-di1/ offerta di lavoro medicina] [http://usverag-ekb.freehostia.com/small/ah-ou/ ah ou nos] [http://assaharp.freehostia.com/html/gainsbourg.htm gainsbourg] [http://macahi-neko.freehostia.com/corso-pic/ corso pic] [http://deathrays.freehostia.com/new/voli-per34.htm voli per fuerteventura] [http://crackoaon.freehostia.com/maxtor-diamondmax8/ maxtor diamondmax 10 250] [http://chistoasya.freehostia.com/topic/een-avond/ een avond] [http://junkland-raed.freehostia.com/styles/isuzu-concessionari.htm isuzu concessionari] [http://chistoasya.freehostia.com/topic/dcc-benq/ dcc60 benq] [http://disexat.freehostia.com/articles/mensaje-de2/ mensaje de texto] [http://macahi-neko.freehostia.com/evanscene/ evanscene] [http://junkland-raed.freehostia.com/styles/camera-voghera.htm camera voghera] [http://disexat.freehostia.com/articles/videocamere-trust/ videocamere trust] [http://chistoasya.freehostia.com/topic/roadsters/ roadsters] [http://junkland-raed.freehostia.com/styles/fiat-panda43.htm fiat panda roma] [http://knave-aof-clubs.freehostia.com/view/sintoamplificatori-teac/ sintoamplificatori teac] [http://lesh1a1.freehostia.com/data/cavo-fireware.htm cavo fireware] [http://assaharp.freehostia.com/html/parlanne.htm parlanne] [http://macahi-neko.freehostia.com/fausses-confidences/ fausses confidences les] [http://lesh1a1.freehostia.com/data/kasta-squad.htm kasta squad] [http://ms-beaeblebrox.freehostia.com/html/martin-mystere7.htm martin mystere vol 05] [http://ptisaa-jill.freehostia.com/luckyboy/ luckyboy] [http://geneocide.freehostia.com/lib/jean-claude1.htm jean claude van damme fotos de pelicula] [http://zankoaku-zen.freehostia.com/lib/grup.htm grup] [http://mysteaaricafende.freehostia.com/sindrome-mani/ sindrome mani piedi] [http://geneocide.freehostia.com/lib/midi-madonna.htm midi madonna] [http://zankoaku-zen.freehostia.com/lib/majestic-usb.htm majestic usb] [http://crackoaon.freehostia.com/camera-lourdes/ camera lourdes] [http://miraxcaorran.freehostia.com/lib/frigo-rex1.htm frigo rex da incasso] [http://ptisaa-jill.freehostia.com/www-lareserve/ www lareserve ch] [http://crackoaon.freehostia.com/mio-fratello2/ mio fratello fuma] [http://disexat.freehostia.com/articles/stampante-hp42/ stampante hp wifi] [http://crackoaon.freehostia.com/silvia-cortesi/ silvia cortesi] 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 02:33, 8 October 2007
hotel lourdes somewher over the rainbow lavastoviglie a scomparsa totale lupo 1000 cartolina elettroniche per bambini fabbrica attrezzature congressi roma non fa la stupida stasera magik key appunto ragioneria cucina ricetta traghetti sardegna navi tirrenia zelda memory noleggio auto torino milan foto ai giocatori 88 brescia rosella i blieve i can fly falam giocatori svincolati dell atalanta www marcopoloshop it musiche scozzesi video modella once upon a time a december vibratore devastante plymouth uni razze bovine piatto batteria gabicce mare monitor lcd 20 1 radio sveglia proiezione ludmilla nuda film il merlo maschio lettore mp3 thomson mino reitano franchising online scansione on line fondotinta pelli grasse amour denfance giradischi denon dp mp3 usb player 1 gb storia e pensiero di jean piaget tatoo foto gratis gloria constantino perez sony kep42mrx1 ciao amico dester plotter hp 500 a1 modem adsl con interfaccia usb e esibiz mutuo case rate frasidamore tito eurosk www muyzorras com feel feel negozi sport wwww mappy com video jeanne tripplehorn volkova versione cornelio nepote cinque ore in contanti child development camerette movenpick sharm hercules fortissimo iv auricolare nokia extreme 3d wesling hey ho lets go www maria de filipppi bluetooth nokia 6680 auricolare galattica autostoppisti www itelefonica com br mina canta battisti duble dragon gunman chronicles canon 20 35 file modem lucent philips 190s5 lcd fx 1050 mole mashall settimana bianche last minute barbaresco il bricco minya el lg dvd recorder dr 7400 on to victory storia di sanremo eli 77 becher johannes robert trova il testo di where is the love batteria creative ritorno alla laguna blu raccconti di travestiti full monty you sexy thing mp3 vendesi runner 125 viacces sms da inviare gratis addobbo floreale la bocca indesit 35 rock nacional lettera a breznev fiat grande punto 1 3 in a while caldaia legna casalinghe in chatt valutare auto usata paolo pietrangeli olimpiad spartiti nelly furtado produzione maglietta ti penso sempre lost and found vedelago fzs fazer trellian disco esterno portatile nec 1770gx kontra new york newyork veneziano le piccole ore grasse taranto prestazioni occasionali sesso i neonati foto ricoh aficio 450 trelew reti doghe legno foto manuela arcuri nuda atoll ancona project gotham smuji hitachi 32 pd5200 anno 2118 progetto x testo e traduzione modern times j five www laburra com cheap flights rca vga accessori audio video goodnight gigi s cdrom game boy adbance el pam pam vino da tavola superdotati di colore s100 magician brevetto sui farm nuove immagini di tomb raider legend dvd live genesis annunci erotici gratuiti per adulti gioielli in argento e pietre bluetooth cellulare need for speed underground ps2 patti labelle https proxify net singing in the rain anelli da donna oro e diamanti biglietti di ringraziamento oum el bouaghi (wilaya) rhum zacapa stampante laser hp 3700 ludove piesne fare un pompino www planeta com pe per qualche dollaro in meno sharmelsheik com diff giorl offerta di lavoro medicina ah ou nos gainsbourg corso pic voli per fuerteventura maxtor diamondmax 10 250 een avond isuzu concessionari dcc60 benq mensaje de texto evanscene camera voghera videocamere trust roadsters fiat panda roma sintoamplificatori teac cavo fireware parlanne fausses confidences les kasta squad martin mystere vol 05 luckyboy jean claude van damme fotos de pelicula grup sindrome mani piedi midi madonna majestic usb camera lourdes frigo rex da incasso www lareserve ch mio fratello fuma stampante hp wifi silvia cortesi 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.