Talk:String Handling Routines: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Kazim
More dead spam
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://jacket.nan-duti.info/ jacket] [http://stepawayfromthe.jenesia.info/ step away from the] [http://permutationgroups.minatare.info/ permutation groups] [http://freemoviescom.minatare.info/ freemovies com] [http://memorylapse.bozine.info/ memory lapse] [http://weed.daimiote.info/ weed] [http://sonyatrac.bozine.info/ sony atrac] [http://autocheatcodegrand.jeopards.info/ auto cheat code grand psp theft] [http://autoshow.woadwax.info/ auto show] [http://effectivesixtrait.jeopards.info/ effective six trait writing] [http://freenokiaringtone.woadwax.info/ free nokia ringtone composer] [http://adobephotoeditor.incloude.info/ adobe photo editor free download] [http://stephenmiller.incloude.info/ stephen miller japan] [http://pre-menopause.bozine.info/ pre-menopause] [http://comparetravel.daimiote.info/ compare travel insurance quotes] [http://mac11gunpictures.nan-duti.info/ mac 11 gun pictures] [http://masturbating.jeopards.info/ masturbating for orgasm] [http://incloude.info/ incloude.info] [http://educationverification.chummies.info/ education verification] [http://dietsheetfor.nan-duti.info/ diet sheet for diverticulitis] [http://wethotsex.woadwax.info/ wet hot sex] [http://flowerfairies.jeopards.info/ flower fairies] [http://exportsqldata.woadwax.info/ export sql data to excel] [http://lollollollol.minatare.info/ lol lol lol lol] [http://internetbusiness.jenesia.info/ internet business] [http://lifeinsurance.woadwax.info/ life insurance] [http://airtravellast.minatare.info/ air travel last minute deal] [http://surplusonlineauction.daimiote.info/ surplus online auction] [http://nyreturnstatus.jenesia.info/ ny return status tax] [http://priceguidefor.hulkage.info/ price guide for rare coins] [http://springbreakgirls.jeopards.info/ spring break girls] [http://superlotto.bozine.info/ super lotto] [http://addressforvirginia.chummies.info/ address for virginia department of taxation] [http://lesbianporn.hulkage.info/ lesbian porn] [http://thebestmotorcycle.nan-duti.info/ the best motorcycle helmet] [http://verizonresidential.bozine.info/ verizon residential phone service] [http://xxx.bozine.info/ xxx] [http://gout.jeopards.info/ gout] [http://sibelkekilli.chummies.info/ sibel kekilli] [http://motorolaenergy.daimiote.info/ motorola energy system group] [http://robertlewisstevenson.chummies.info/ robert lewis stevenson state park] [http://storyboards.hulkage.info/ storyboards for commercial] [http://bozine.info/index3_250.html link] [http://asianmilf.jenesia.info/ asian milf] [http://remington.jeopards.info/ remington] [http://smaengines.jenesia.info/ sma engines] [http://whythetwintowers.incloude.info/ why the twin towers did not fall] [http://inventortutorial.woadwax.info/ inventor tutorial] [http://kidneyprotein.nan-duti.info/ kidney protein tests] [http://arranhotels.nan-duti.info/ arran hotels] [http://spaingdp2005.jeopards.info/ spain gdp 2005] [http://e-donky.nan-duti.info/ e-donky] [http://adipexonline.nan-duti.info/ adipex online] [http://petsupplies.daimiote.info/ pet supplies and products] [http://mazdapartaccessory.incloude.info/ mazda part accessory] [http://friedmansjewelry.jenesia.info/ friedmans jewelry] [http://movietickets.incloude.info/ movie tickets] [http://floridalottery.woadwax.info/ florida lottery result] [http://mexicansex.nan-duti.info/ mexican sex] [http://pantyhose.jenesia.info/ pantyhose] [http://eurjclinmicrobiol.hulkage.info/ eur j clin microbiol infect dis] [http://cymbaltaandweight.jeopards.info/ cymbalta and weight gain] [http://woodenshoesrack.chummies.info/ wooden shoes rack] [http://memorytestcomputer.daimiote.info/ memory test computer software] [http://laser.nan-duti.info/ laser] [http://angelinenude.chummies.info/ angeline nude] [http://pacificstatescast.incloude.info/ pacific states cast iron] [http://incloude.info/index8_666.html site] [http://portalbestpractices.chummies.info/ portal best practices] [http://upperdeckkids.jeopards.info/ upper deck kids] [http://enzyte.chummies.info/ enzyte] [http://mastercanada.jeopards.info/ master canada] [http://pamanderson.woadwax.info/ pam anderson fuck] [http://anticancerdiets.chummies.info/ anti cancer diets] [http://acuramdx2003.incloude.info/ acura mdx 2003] [http://fentanylpatch.incloude.info/ fentanyl patch] [http://insurancesalelead.minatare.info/ insurance sale lead] [http://aclucollege.minatare.info/ aclu college] [http://enalapril.chummies.info/ enalapril] [http://andsupplychain.woadwax.info/ and supply chain management and] [http://512shoes.nan-duti.info/ 5 1 2 shoes] [http://satellitephotos.chummies.info/ satellite photos] [http://myspacefont.bozine.info/ myspace font] [http://freequiltpatterns.daimiote.info/ free quilt patterns] [http://piem.minatare.info/ piem] [http://safricanpopmusic.nan-duti.info/ s african pop music] [http://vitamincdailyrequirements.hulkage.info/ vitamin c daily requirements] [http://adoptachild.bozine.info/ adopt a child] [http://schoolgerls.minatare.info/ school gerls] [http://retirementsavings.daimiote.info/ retirement savings program] [http://freelesbianporn.nan-duti.info/ free lesbian porn movie] [http://lunestasideeffects.woadwax.info/ lunesta side effects] [http://templating.incloude.info/ templating] [http://bustyamateur.woadwax.info/ busty amateur] [http://zodiacsigns.hulkage.info/ zodiac signs] [http://3dbackground.jeopards.info/ 3d background] [http://playthemansion.hulkage.info/ play the mansion] [http://indianmexican.nan-duti.info/ indian mexican tribe] [http://weddingflower.jenesia.info/ wedding flower holders] [http://newconstruction.woadwax.info/ new construction charlotte nc] [http://aura.c3.hu/thumb/cabwba.html presentacion de una empresa] [http://ndr.hu/rhodes/evqtmk.html peter regan] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/bbffqa.html escape code for] [http://www.salona-yachts.eu/misc/ulijbm.html world poker tour commerce] [http://aura.c3.hu/thumb/mbkrnl.html sean johns clothing line] [http://kristinlyseggen.com/gallery/1documentaries/7travel/cfawsk.html pictures of slavery in africa] [http://www.farmelco.hu/test/css/csjwui.html tco 99] [http://ndr.hu/rhodes/jqlsih.html resell computer] [http://informer.siam.edu/themes/hm/ssofct.html audiovox ringtone] [http://www.salona-yachts.eu/misc/leeurs.html up do hairstyle photos] [http://www.farmelco.hu/test/css/hirrqw.html shabby chic baby sheets] [http://www.housing.und.edu/reshalls/blog/wp-content/uploads/2007/04/img/uvnnkg.html order actos] [http://kristinlyseggen.com/gallery/1documentaries/7travel/wecmjc.html vintage nudists photo galleries] [http://www.farmelco.hu/test/css/gtnmvi.html teenage girls with red hair] [http://maps.my2gig.com/cache/uxsssi.html 2 block writer] [http://ndr.hu/rhodes/rpmupe.html info http search ebay com electr] [http://2001.c3.hu/mas/dhbguf.html information on addiction] [http://aura.c3.hu/thumb/jrxdwh.html icao code] [http://2001.c3.hu/mas/hchwgv.html register domain names search engine] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/rdlekj.html volkswagen truck] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/ohjfjk.html adventure tourism canada] [http://aura.c3.hu/thumb/ugqlpx.html pictures of geisha girl] [http://informer.siam.edu/themes/hm/jlbojl.html hydrocodone] [http://2001.c3.hu/mas/htagkx.html pacific specialty ins] [http://activeimage.c3.hu/css/rbrslt.html the wellington hotel ny] [http://2001.c3.hu/mas/onanmi.html oregon cell phone service] [http://activeimage.c3.hu/css/mbntha.html list zombie movie] [http://informer.siam.edu/themes/hm/ndpadi.html discount wellbutrin] [http://2001.c3.hu/mas/ajjjrb.html time in lahore] [http://activeimage.c3.hu/css/mdrwdt.html italian visa uk] [http://www.housing.und.edu/reshalls/blog/wp-content/uploads/2007/04/img/wkolim.html cheap paxil] [http://ndr.hu/rhodes/hrpblw.html maintenance web site india] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/uxafrg.html problem solving games for children] [http://informer.siam.edu/themes/hm/aecakb.html cheap ionamin] [http://www.salona-yachts.eu/misc/nufglq.html army of the night] [http://aura.c3.hu/thumb/codfqv.html mac network games] [http://aura.c3.hu/thumb/vfdbeu.html liqueur chocolate] [http://informer.siam.edu/themes/hm/cvmncm.html cheap codeine] [http://www.farmelco.hu/test/css/buclrg.html protection racket cases] [http://www.farmelco.hu/test/css/esptlg.html microsoft problem window] [http://aura.c3.hu/thumb/cjtnif.html twisted porn picture] [http://informer.siam.edu/themes/hm/euirxk.html download tv ringtones] [http://informer.siam.edu/themes/hm/vdqftx.html discount imitrex] [http://www.housing.und.edu/reshalls/blog/wp-content/uploads/2007/04/img/ftoosw.html buy zanaflex] [http://maps.my2gig.com/cache/krocnm.html our lady peace life lyric] [http://ndr.hu/rhodes/ancedc.html power plant professional] [http://troniny.ovh.org/gallery/layout/lxfkev.html void volume fraction] [http://www.farmelco.hu/test/css/ahabhl.html jobs in lansing mi] [http://www.salona-yachts.eu/misc/afcfbl.html local radar texas weather] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/mgkbgk.html buspar online] [http://troniny.ovh.org/gallery/layout/ifjbfq.html esp audio pages] [http://aura.c3.hu/thumb/xjadfs.html port stephens australia] [http://2001.c3.hu/mas/phjipw.html art image space] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/nllokk.html ip table] [http://2001.c3.hu/mas/nqaccb.html robert frances group] [http://informer.siam.edu/themes/hm/lggjev.html buy ephedra] [http://aura.c3.hu/thumb/jqudul.html internet explorer wont connect to internet] [http://www.farmelco.hu/test/css/ghdejw.html what is a non compete clause] [http://ndr.hu/rhodes/sutuug.html x box rainbow six 3 cheat code] [http://informer.siam.edu/themes/hm/dpxtke.html kyocera ringtone] [http://activeimage.c3.hu/css/kljdkj.html article discipline in school] [http://troniny.ovh.org/gallery/layout/pcfvww.html pension health] [http://aura.c3.hu/thumb/klbvpa.html phoenix az. real estate] [http://2001.c3.hu/mas/ehjdqi.html precision flight controls inc] [http://2001.c3.hu/mas/ckmcad.html playing music on psp] [http://maps.my2gig.com/cache/usnoks.html myspace symbol text] [http://www.farmelco.hu/test/css/fdodnr.html marriot singapore hotel] [http://aura.c3.hu/thumb/xcpdme.html leathers clothing] [http://www.salona-yachts.eu/misc/opdbnl.html to beat the child was bad enough] [http://aura.c3.hu/thumb/ddcfol.html tracker cars] [http://2001.c3.hu/mas/wgkjrs.html angelina jolie naked pic] [http://troniny.ovh.org/gallery/layout/pjxdno.html international freight forwarding uk] [http://2001.c3.hu/mas/bvtcbn.html software for cnc] [http://2001.c3.hu/mas/uweabw.html national labour market statistics] [http://www.farmelco.hu/test/css/jisdme.html also as known madonna rock] [http://www.housing.und.edu/reshalls/blog/wp-content/uploads/2007/04/img/aheiim.html metformin online] [http://informer.siam.edu/themes/hm/eammfj.html buy tamiflu] [http://informer.siam.edu/themes/hm/auhuvd.html carisoprodol] [http://www.salona-yachts.eu/misc/nqfsnk.html landscape phoenix services] [http://activeimage.c3.hu/css/gsejho.html removing moles] [http://kristinlyseggen.com/gallery/1documentaries/7travel/akuebm.html australia discount tours] [http://ndr.hu/rhodes/qivaxc.html personalized kid toy] [http://informer.siam.edu/themes/hm/cxdwfo.html order fluoxetine] [http://www.farmelco.hu/test/css/geject.html mortgage lending companies] [http://troniny.ovh.org/gallery/layout/jfsrul.html xhtml form elements] [http://2001.c3.hu/mas/hpsppj.html speaking trumpet] [http://2001.c3.hu/mas/nhbbml.html apartment city downtown iowa] [http://2001.c3.hu/mas/bvlhxe.html screenshots vista window] [http://ndr.hu/rhodes/ktjxww.html assurance empire general life] [http://aura.c3.hu/thumb/jvwkjn.html underwriter salary] [http://2001.c3.hu/mas/duluqn.html ip address location software] [http://activeimage.c3.hu/css/svbkqc.html patriots helmets] [http://informer.siam.edu/themes/hm/cdhssx.html diflucan online] [http://kristinlyseggen.com/gallery/1documentaries/7travel/wgsegi.html small in ground pool] [http://activeimage.c3.hu/css/qpwhda.html airport logan map] [http://www.salona-yachts.eu/misc/tgxknq.html mortar tile] [http://aura.c3.hu/thumb/dpmahd.html mens medium hair styles] [http://aura.c3.hu/thumb/kkpour.html evolution midi controllers] [http://2001.c3.hu/mas/jgismc.html theme of as i lay dying] [http://ideonomy.mit.edu/wiki/config-OFF/config/gsh/enf001/njifdl.html epilepsy brain disorder] 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 05:42, 7 November 2007

jacket step away from the permutation groups freemovies com memory lapse weed sony atrac auto cheat code grand psp theft auto show effective six trait writing free nokia ringtone composer adobe photo editor free download stephen miller japan pre-menopause compare travel insurance quotes mac 11 gun pictures masturbating for orgasm incloude.info education verification diet sheet for diverticulitis wet hot sex flower fairies export sql data to excel lol lol lol lol internet business life insurance air travel last minute deal surplus online auction ny return status tax price guide for rare coins spring break girls super lotto address for virginia department of taxation lesbian porn the best motorcycle helmet verizon residential phone service xxx gout sibel kekilli motorola energy system group robert lewis stevenson state park storyboards for commercial link asian milf remington sma engines why the twin towers did not fall inventor tutorial kidney protein tests arran hotels spain gdp 2005 e-donky adipex online pet supplies and products mazda part accessory friedmans jewelry movie tickets florida lottery result mexican sex pantyhose eur j clin microbiol infect dis cymbalta and weight gain wooden shoes rack memory test computer software laser angeline nude pacific states cast iron site portal best practices upper deck kids enzyte master canada pam anderson fuck anti cancer diets acura mdx 2003 fentanyl patch insurance sale lead aclu college enalapril and supply chain management and 5 1 2 shoes satellite photos myspace font free quilt patterns piem s african pop music vitamin c daily requirements adopt a child school gerls retirement savings program free lesbian porn movie lunesta side effects templating busty amateur zodiac signs 3d background play the mansion indian mexican tribe wedding flower holders new construction charlotte nc presentacion de una empresa peter regan escape code for world poker tour commerce sean johns clothing line pictures of slavery in africa tco 99 resell computer audiovox ringtone up do hairstyle photos shabby chic baby sheets order actos vintage nudists photo galleries teenage girls with red hair 2 block writer info http search ebay com electr information on addiction icao code register domain names search engine volkswagen truck adventure tourism canada pictures of geisha girl hydrocodone pacific specialty ins the wellington hotel ny oregon cell phone service list zombie movie discount wellbutrin time in lahore italian visa uk cheap paxil maintenance web site india problem solving games for children cheap ionamin army of the night mac network games liqueur chocolate cheap codeine protection racket cases microsoft problem window twisted porn picture download tv ringtones discount imitrex buy zanaflex our lady peace life lyric power plant professional void volume fraction jobs in lansing mi local radar texas weather buspar online esp audio pages port stephens australia art image space ip table robert frances group buy ephedra internet explorer wont connect to internet what is a non compete clause x box rainbow six 3 cheat code kyocera ringtone article discipline in school pension health phoenix az. real estate precision flight controls inc playing music on psp myspace symbol text marriot singapore hotel leathers clothing to beat the child was bad enough tracker cars angelina jolie naked pic international freight forwarding uk software for cnc national labour market statistics also as known madonna rock metformin online buy tamiflu carisoprodol landscape phoenix services removing moles australia discount tours personalized kid toy order fluoxetine mortgage lending companies xhtml form elements speaking trumpet apartment city downtown iowa screenshots vista window assurance empire general life underwriter salary ip address location software patriots helmets diflucan online small in ground pool airport logan map mortar tile mens medium hair styles evolution midi controllers theme of as i lay dying epilepsy brain disorder 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.