Talk:String Handling Routines

From Kolmafia
Revision as of 18:43, 8 October 2007 by 64.27.5.49 (talk)
Jump to navigation Jump to search

osvaldo valenti tom tom gps 80 bmw e30 maglina cavlli whirlpool jt356 www polizia it ddr 266 memoria ram modem robotic termine cartuccia epson c80 batteria canon i80 basso music man processore p4 3 2 henger musicology prince kettler altalena ecografia alla prostata trans rettale asus scheda madre 754 limao toshiba 32wl56p dead to right ii nv gs400 batteria ibook fiori perline tv monitor lcd 7 marco visentin emilie simon desert mp3 pastore tedesco bach toccata e fuga who would be billionaire ipssar catania sexy arab women mean streets carmella de cesare kings of conveniece ouch raf i patrioti di rise of nations frasi augurali per le future mamme pamela e tommy video hard da scaricare ross james clark micronde jbl scs 178 storage nas obiettivi macro sigma 105 www geoogle com mx assicurazione lissone nuove immagini per shadow of the colossus scheda audio 5 1 notebook punch (teatro inglese) alfa gta de franceschi reggiseno sportivo cerita seks melayu quattro passi sul lenzuolo zyprexa 28 cpr 10 mg banda bassotti cd musicali numero di telefono comune di pompei colpo da 500 milioni alla national bank fiume sarno deep purple platinum collection video michel vieth motor di ricerca nije fer tom jones live at cardiff castle techen de randfichten holzmichel sean astin pricipessa 2323 robin cook libri apprendista jedi fanta avventura salud la mucca pazza xfx geforce 7800 gtx www symantec com atlas routier italia victoria principal pompe a cavalli cruise vacation a6va q021h appartamento affitto vacanza sony psp white gecube x850xt bosch mcm 2000 onde roma nord frasi auguri innaugurazione babool adattatori autoradio leoncavallo collezione moneta presentazione del sampdoria il volo de calabrone live show vacanze grecia napsters le serve lettori memory card magnex belalim lettore mp3 hard disk max pin copertina renga maxtor 80gb ide mfc 8840d lettori divx combo locatelli canalis ciro mazda 3 km zero suicide luomo che non seppe tacere ding ding doong cartuccia canon s200x batteria motorola cd930 alicebusiness it nomi per tatuaggi buona giornata space shuttle sony ultra portatile dizionario tecnico italiano inglese grand prix challenge you and me bubblin cantanti sexi samsung vpd351 nokia fm seat ibiza 14 16v 5p plus epson stylus rx jamella diablo 2 editor scuole di estetica tatuaggi di ideogrammi giapponesi bobbit donne vogliose della basilicata mk c12 calabuig lavoro week end studio medico roma creazione curriculum coppie erotiche mustek ups powermust 600 usb trucchi yu gi oh portland www juan pablo raba com puertorico amd athlon 64 3400 754 cornelio reyna ricerca auto usata full metal alchemist anche su game boy advance barbie griffin cueball karaokefiles emporio musicale di siena data premiazione mtv roma 2004 bacio saffico carolina rima 1 lo strano percorso u sito di belli e brutti telefoni samsung caudillo ddr pc2700 cl2 5 memoria ram filisetti beauty farm toscana aeg 48380 e mule download nikon d2hs pono com ok prezzo giust pesca in ferri da stiro rowenta nino de angelo senza giacca e cravatta sfondami san mateo aeroporto linate lengua y cultura duo sin bandera y franco de vita la vendetta dei morti viventi modem fax interno scandalo segreto lavastoviglie a scomparsa totale je veux une femme like u frogga quickcam for notebook deluxe canon ef 2470mm f 2 8 l usm uomini duri lifegate canon ef 70200mm amd athlon 1800 east detroit pisa italia indiana line pl 16 panasonic lumix dmc ls1eg s terapia luce aforismi d amore e tempo cliamx olivia magnani scandalo nudo maschile al cinema funcard 6 frontini centrino 2g attrici trans lucrezio 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.