Talk:String Handling Routines

From Kolmafia
Revision as of 23:45, 27 October 2007 by 200.226.134.53 (talk)
Jump to navigation Jump to search

km 400 gracie fields www sean paul i don t want your back wacky races Extreme cfnm krazy racers sede exw mia agaph gps sd tomtom voipstunt men o man mp corn guernsey dragostea haiducci esca url depp impact adsl wifi modem x850xt 256 arc 4120 alu moulin roge raoul ant the king of spain map dvd dvix samsung rayman m wintv pvr mce philips lcd 30 fuji finepix s2 mypal asus a620bt anywhy.info ssmax office 2003 word asus a6va q021h berg nick gamma srl thermaltake w0049 680w card reader celeb oops goldeneye rogue agent www yoox marrons this love porno cartoon cavo fire www gr url beauty babyh rapina al sole www sat link com apodoses.info ken 3 guess co toyota a km 0 beheaded of sum ii cihat askin lcd sharp aquos elin nordegren microsoft isa server 2004 fabien on my kness fighi hooters j krantz true image 8 0 hoyun lifebook 7010 tape mark dannii sapphire x800 xt art garfunkel cic pdp 506xde shapeshifter stephen hawking lanfa van googh he feels me up dwl g520 racingclub www keisha com fiat x1 9 a l b a apodoses.info crazy taxi ridge racer psp tete sode mena abdullah nike aqua yer cuntry photoshow 2005 peter kremer knights rider toyota land cruiser lj70 gruppo dei sei hp dlp mp 3130 dormire a como quilmes rock in hand scan jfk find out ducci speaker ouahigouya asus mx wisdom dwl 2000 ap kaho Dojinshi biz nero vhs tango roxanne velvet underground full film porno free lavigne eros mercedes slk 200 evo dy sy nokia 310t decoder vgn s4hp b demand tuxedemoon Preteen bbs procedure sql trekkies bias motos gp david crosby cn 65 trans free pics computer toshiba ram 66mhz anywhy.info sapphire radeon x700 pro katy rose overdrive homepage Sylvie lubamba topless spider man theme yhe grudge igi2 schwelm thermaltake 680w fifa 2000 express irispen compex 2 mp3 512 philips moda uomo 2005 www roten unrust.info tv lcd dvd combo www semarnat gob mx hs 2r nokia Verga Gioiello bracciale tennis Test intelligenza gratis Gongolocom Venaria reale Pandamoviescom Hotel spoleto Foto puttanelle Vip uomini nudi Altamura Pescara calcio Traduci testi Polinesia francese tahiti attrazioni Kelis Affitta casa calabria it Collant sexy Stock fallimento Www banca intesa it Maglioni Ischia albergo terme H2210 Chat porno Prenotazione albergo venezia Portogruaro pensione completa barcellona La fata carabina Canzoni zecchino d oro Pasticceria Shitting smut Racconto eros tuttinudi Ombrellone snodo Pubblicita deodorante Gay strip Senewebcom Foto sexy Bocchino amatoriali Distributori automatici snack Caravelle Trampi it Video asia d argento Fiat panda Meteo previsioni satellite Www sexyvip tv Prestito villafranca d asti Canon digital ixus i Folletto vorwerk Gloryhole gallery Female domination Voli savona Casalinghe maggiorate Albergo economici lisbona Promozioni auto nuove Voli economici thailandia La casa dalle finestra che ridono Colorare disegni per bambini Natura romanticismo Casalinghe amatoriali Bicocca Grammatica online Sexi video Nudo di maschio Copertina ita ps2 Studentesse puttane Donne vogliose video Stabilizzatore ottico sony foto camera Rulliere nastro trasportatori Albergo sydney Shyla stylez mr big dick s hot chick hot Ainett stephens calendario Crea nomi glitterati Ciccione nude gratis Caminetto esterno Foto porno disney Gulliver concorso rcs it Aldo carpi Ragazze nude tedesche Crociera it Sexy bikini model Congelatore verticale alaska Weight watchers Giordania Nikki blond Acquisto personal computer Modem adsl router wireless Incontri campania Licata Foto mature hard Peuterey abbigliamento Video justine mattera Calcio storia Decathlon it Modem asus isdn Annuncio cuori solitari Elisabetta ferri nuda Foto donne amatoriali Apartment dallas rental uptown Monte conero Significato rosa blu Loredana lecciso nuda spiderman 2 al r dwl g122 scarpe da sposa sea glider bounce blue nikon 70 300 mm leslie sob love bugs ferro a secco helen lacie safe classroom2 bmw touring 330xd photos of andrea teenie sexxx dec 21 telecom base dect maxtor ethernet philips 201b40 21 guns n roses mp3 acer tm 382tmi skiman x600 pro all in wonder catsong ligth my fire lcd 3 ased geforce fx5500 256mb tv su notebook beatles tab babalawo az sanyo suomi24 fi funy sex cats asus a4l yety sports 2 epox 9npa screenplay 5000 mambo hempstead hilux toyota index they not gona get us teflon cortan hp t3030 nokia pbx url eh 53 master card pooh dvd fewest.cn napes.cn mp3 apple dadamo com booker t index www esmas com mx voice tracer philips duck hunt video gf inglese frase laurea gruppo energy protector www ogrisch com z750 record of lodoss war link the beat fleet suba club sex julie strain zeuglodon homepage topo asus p5wd2 premium wifi tv Gay huge cock mustek h140 gasca aspira acqua vasca da bagno fewest.cn denudos et l2908 104 nec dvd rende site basket nba bose hi fi kenny drew huy 82 fra w w w ultrablue cam wonderful sea cd cover pooh fire man dvd a hanging rock smart forfour dragostea don tei anniversary party 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.