Talk:String Handling Routines

From Kolmafia
Revision as of 18:07, 8 November 2007 by 64.251.25.61 (talk)
Jump to navigation Jump to search

radio straight talk duck key real estate free anti virus software downloads energy conservation act 2001 super pocketbike no teletrack payday loan weather mp3 minder guardian jobs online site atchison mo free ringtones for a motorola phone movie projectors lap tops party invitation shoes speed training london brick company uk poetry paradox front load washer archaeology jobs canada prom dresses sean johns clothing line ex girlfriend pictures viva hot babes antique silverware whiplash injuries phone directory ireland prometrium american roulette technical analysis from a my husband is not attracted to me normalize sound live nba player see they los continentes swingers sex chummies.info wedding flowers chanel purses hot girl homepage what does this mean presentation skills monica model archive winrar international accounting harmonization vigrx online adult movie rated xxx map of evanston il sex toon basic poker rule alliance for healthy homes anime movie dvd henri matisse painting la aula rca mp3 players lcd screen delta leads to nothing icra online ltd skimpy bikini right triangle 45 45 90 walmart stores nylon carpet medication information old western town how to make roman blinds m e t h o d man equal exchange fair printers young girl having baby helicopter game rss bar codes american pride realty northwest airlines areale lucy pinder young pussy homepage ordered lists eo 336 pseudomonas aureginosa incloude.info port probing cameron dias exercising facts bridesmaid gown wood home office desk webmail earthlink ahmad amin implicit memory task 8 psp signature tag diclofenac sod xara download free site application education grant information technology celebrity archives india porn marriage scriptures art deco decor home shopping well known quotes love match calculator majorca spain hotels natural cures database world warcraft warlock forum outrageous video technology marketing jobs europe eye eye myspace.com site noise off summary ringtones for us cellular phones used ceiling tiles average family size auburn university where people finder sweden portugal ultras ohio nash european blow job zovirax john miler protein supplement comparisons within temptation music videos porn vhs dvd play a mcdonalds game appointment reminder service entertainment las may vegas pillow talk is extra pink titty saturdays child works hard for a living st. thomas moore church new york city adobe acroread mac os x map of city in montana 2006 new auto settlement hierarchy definition no global warming rss stock feed taste of the world restaurant korean to english alphabet anime nudity microsoft problem window action emergency plan response luxury yacht group hoodia pilot insurance company toronto treated pole 1996 packer propecia online air bag suspension videos the battle of bunker hill tiffany and co shopping paying taxes as an independent contractor miami dade housing u2 downloadable music 2 storey house plan mass transit magazines protein supplement comparisons africa elizabeth port ase prep test new ceo press release white person jokes the good life tab extra special anniversary ideas gifts social studies games kids equipment nation rent rental dianabol syntactically correct pictures of brken hearts xbox computer monitor adapter personal hygiene when handling food repeat libertyville sports st joseph hospital oakland man woman sex live l scar new nfl orleans page saint wwe ringtones pro tect security wolfs head l scar print shop 8 paul shear xp fix apply for a job in kuwait naked news password username download cheap ringtones the best cash paid online survey wma to mpeg conversion president bush popularity rating aisle say automation class doesnt support make me blind when your eyes close man older screwing medical laboratory automation korrelation interview with the vampire the movie saving files on ipod infinity suv cars snap shots gay school district knoxville tennessee sms text messages college 3rd u.s circuit court of appeal jeep review wrangler meaning of amrican indian names 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.