Talk:String Handling Routines: Difference between revisions
imported>Kidoblivious m 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://setch.22web.net/data/pension-services/ pension services ltd] [http://lethal.talk4fun.net/blog/us-military.html us military involvement in africa] [http://kimpurusha.talk4fun.net/content/map-city.html map city in pa] [http://manaev.talk4fun.net/blog/enigma-studio.html enigma studio] [http://julialincoln.totalh.com/content/sailor-moon/ sailor moon download] [http://ellatsinela.22web.net/content/love-spells/ love spells reviewed] [http://divhysteric.byethost13.com/small/milfs-bbw.html milfs bbw blogs] [http://kimpurusha.talk4fun.net/content/amg-music.html amg music reviews] [http://divhysteric.byethost13.com/small/petite-land.html petite land] [http://setch.22web.net/data/world-bank/ world bank education data] [http://manaev.talk4fun.net/blog/real-yellow.html real yellow pages com] [http://ellatsinela.22web.net/content/mercy-me/ mercy me] [http://komoff.talk4fun.net/lib/stand-for.html stand for bike rack] [http://liubash.talk4fun.net/library/-dress.html 2005 dress wedding] [http://belik.totalh.com/toshiba-customer/ toshiba customer support number] [http://englishdork10.22web.net/data/easy-elementary/ easy elementary science fair project] [http://ellatsinela.22web.net/content/promise-ring/ promise ring tradition] [http://lethal.talk4fun.net/blog/lyrics-for.html lyrics for oh boy] [http://woopwooooop.22web.net/vivid-dream/ vivid dream] [http://sham0t.22web.net/blog/picture-of/ picture of politicians] [http://komoff.talk4fun.net/lib/vector-force.html vector force] [http://belik.totalh.com/jose-toledo/ jose toledo] [http://atomites.talk4fun.net/data/miss-kansas.html miss kansas usa 2005] [http://manaev.talk4fun.net/blog/-s.html 80 s cartoon] [http://julialincoln.totalh.com/content/international-hair/ international hair and nail show] [http://setch.22web.net/data/old-english/ old english alphabet letter] [http://setch.22web.net/data/poetry-competitions/ poetry competitions for children] [http://lethal.talk4fun.net/blog/landing-a.html landing a plane] [http://atomites.talk4fun.net/data/ken-burns.html ken burns biography] [http://belik.totalh.com/the-inn/ the inn bed and breakfast] [http://setch.22web.net/data/vbhelper/ vbhelper] [http://bedep.totalh.com/content/london-magician/ london magician] [http://bedep.totalh.com/content/what-do/ what do rodents eat] [http://atomites.talk4fun.net/data/kids-video.html kids video chat rooms] [http://woopwooooop.22web.net/recall-total/ recall total information] [http://woopwooooop.22web.net/work-and/ work and study abroad for canadians] [http://englishdork10.22web.net/data/wwe-champion/ wwe champion belts] [http://julialincoln.totalh.com/content/romantic-evening/ romantic evening tip] [http://liubash.talk4fun.net/library/used-currency.html used currency counter] [http://belik.totalh.com/image-picture/ image picture sex] [http://shadowycorner.talk4fun.net/small/illinois-special/ illinois special education scholarship] [http://divhysteric.byethost13.com/small/australian-female.html australian female teachers history of teachers] [http://belik.totalh.com/vestno/ vestno] [http://julialincoln.totalh.com/content/mature-appeal/ mature appeal com] [http://woopwooooop.22web.net/rounded-corner/ rounded corner] [http://kimpurusha.talk4fun.net/content/-degree.html 45 degree] [http://woopwooooop.22web.net/sad-away/ sad away messages] [http://komoff.talk4fun.net/lib/minnesota-free.html minnesota free public record] [http://julialincoln.totalh.com/content/java-context/ java context api] [http://manaev.talk4fun.net/blog/travelocity-paris.html travelocity paris] [http://bedep.totalh.com/content/international-financial/ international financial reporting standards courses] [http://manaev.talk4fun.net/blog/education-residential.html education residential specialist] [http://divhysteric.byethost13.com/small/audio-book.html audio book free history] [http://shadowycorner.talk4fun.net/small/the-birth/ the birth order theory] [http://belik.totalh.com/kellly-services/ kellly services] [http://manaev.talk4fun.net/blog/sql-server.html sql server ignore] [http://ellatsinela.22web.net/content/pet-loss/ pet loss crisis lines] [http://kimpurusha.talk4fun.net/content/slovenia-girls.html slovenia girls] [http://julialincoln.totalh.com/content/rod-storage/ rod storage unit] [http://liubash.talk4fun.net/library/notice-sample.html notice sample terminate] [http://setch.22web.net/data/product-development/ product development process model] [http://atomites.talk4fun.net/data/internet-providers.html internet providers austin] [http://sham0t.22web.net/blog/mini-golf/ mini golf orlando] [http://woopwooooop.22web.net/people-care/ people care inc] [http://liubash.talk4fun.net/library/-thompson.html 60 thompson hotel in new york] [http://komoff.talk4fun.net/lib/alaska-weather.html alaska weather underground] [http://setch.22web.net/data/the-rift/ the rift magazine] [http://sham0t.22web.net/blog/astonishing-maker/ astonishing maker money] [http://sham0t.22web.net/blog/pulled-my/ pulled my top] [http://komoff.talk4fun.net/lib/north-america.html north america united state arts and entertainment] [http://julialincoln.totalh.com/content/large-size/ large size mother of the bride dress] [http://shadowycorner.talk4fun.net/small/new-york/ new york golf clubs] [http://setch.22web.net/data/treatment-of/ treatment of bronchitis] [http://belik.totalh.com/i-gladly/ i gladly] [http://belik.totalh.com/janet-stevenson/ janet stevenson] [http://woopwooooop.22web.net/pc-turntable/ pc turntable] [http://woopwooooop.22web.net/imperial-in/ imperial in las palace site vegas web] [http://ellatsinela.22web.net/content/lawerance-university/ lawerance university] [http://komoff.talk4fun.net/lib/e-m.html e m automotive] [http://atomites.talk4fun.net/data/new-sex.html new sex toy video] [http://divhysteric.byethost13.com/small/personal-income.html personal income tax history] [http://manaev.talk4fun.net/blog/myanmar-flag.html myanmar flag] [http://lethal.talk4fun.net/blog/international-law.html international law article] [http://setch.22web.net/data/oral-cavity/ oral cavity] [http://komoff.talk4fun.net/lib/sarah-stone.html sarah stone barton] [http://liubash.talk4fun.net/library/la-bella.html la bella y la] [http://ellatsinela.22web.net/content/attorney-divorce/ attorney divorce houston in] [http://divhysteric.byethost13.com/small/northshore-high.html northshore high school houston] [http://kimpurusha.talk4fun.net/content/look-catalog.html look catalog] [http://liubash.talk4fun.net/library/-crown.html 2006 crown victoria] [http://liubash.talk4fun.net/library/state-laws.html state laws of texas] [http://komoff.talk4fun.net/lib/majority-government.html majority government in canada] [http://atomites.talk4fun.net/data/state-education.html state education department] [http://ellatsinela.22web.net/content/verbal-and/ verbal and non verbal tests] [http://ellatsinela.22web.net/content/international-law/ international law marriage] [http://kimpurusha.talk4fun.net/content/mls-listing.html mls listing in va] [http://woopwooooop.22web.net/theeducationcenter/ theeducationcenter] [http://komoff.talk4fun.net/lib/antique-fire.html antique fire engine] [http://manaev.talk4fun.net/blog/video-workstations.html video workstations] [http://shadowycorner.talk4fun.net/small/amusement-indiana/ amusement indiana park] [http://elloveda.6te.net/description/rebate/ rebate] [http://cueliza.ueuo.com/directory/gold-miner.html gold miner vegas] [http://krgiffor.orgfree.com/description/cingular-wireless/ cingular wireless] [http://elloveda.6te.net/description/puppies-for/ puppies for sale] [http://ovap-poll.ueuo.com/html/northern-tools.html northern tools and equipment] [http://tesibrel.orgfree.com/blog/mens-jeans/ mens jeans] [http://kupeddy.orgfree.com/web/estimate-my.html estimate my tax return] [http://laneusus.ueuo.com/teen-sex.html teen sex porn] [http://weboland.6te.net/description/depression-treatment/ depression treatment] [http://cabanes.orgfree.com/small/guitar-lessons/ guitar lessons] [http://metheres.6te.net/content/hardcore-black.html hardcore black porn] [http://etpeach.ueuo.com/directory/railings/ railings] [http://hohoffma.ueuo.com/coffee-makers/ coffee makers] [http://laneusus.ueuo.com/free-download.html free download norton anti virus] [http://hohoffma.ueuo.com/ab-lounge/ ab lounge] [http://bacowen.orgfree.com/view/party-invitation/ party invitation] [http://wekaiser.6te.net/lowest-fare/ lowest fare airline ticket] [http://weboland.6te.net/description/debt-consolidation/ debt consolidation loan] [http://jacordia.6te.net/currency-exchange.html currency exchange] [http://mabeckha.6te.net/blog/cum-sluts.html cum sluts] [http://thsteger.ueuo.com/view/voyer-sex.html voyer sex] [http://bacowen.orgfree.com/view/large-women/ large women bras] [http://thsteger.ueuo.com/view/arthritis-early.html arthritis early symptoms] [http://krgiffor.orgfree.com/description/lowest-airfare/ lowest airfare] [http://kupeddy.orgfree.com/web/motrin.html motrin] [http://metheres.6te.net/content/ten-commandments.html ten commandments] [http://mabeckha.6te.net/blog/sex-clip.html sex clip] [http://krgiffor.orgfree.com/description/home-heating/ home heating] [http://nocam.ueuo.com/data/microwave-oven/ microwave oven] [http://bacowen.orgfree.com/view/detroit-airport/ detroit airport] [http://nocam.ueuo.com/data/crystal-jewellery/ crystal jewellery] [http://bacowen.orgfree.com/view/weddings-dresses/ weddings dresses] [http://etpeach.ueuo.com/directory/outboard-motors/ outboard motors] [http://wekaiser.6te.net/mexico/ mexico] [http://kupeddy.orgfree.com/web/white-page.html white page] [http://etpeach.ueuo.com/directory/midi-ringtone/ midi ringtone] [http://weboland.6te.net/description/gas-card/ gas card] [http://weboland.6te.net/description/forex-trading/ forex trading] [http://wekaiser.6te.net/huge-vibrator/ huge vibrator] [http://etpeach.ueuo.com/directory/gothic-shoes/ gothic shoes] [http://thsteger.ueuo.com/view/cricket-wireless.html cricket wireless phone service] [http://cueliza.ueuo.com/directory/soccer-players.html soccer players] [http://kupeddy.orgfree.com/web/employee-review.html employee review forms] [http://etpeach.ueuo.com/directory/newborn/ newborn] [http://cabanes.orgfree.com/small/furniture/ furniture] [http://bacowen.orgfree.com/view/audi-a/ audi a2] [http://etpeach.ueuo.com/directory/marriage/ marriage] [http://etpeach.ueuo.com/directory/man-mesh/ man mesh underwear] [http://nocam.ueuo.com/data/purchase-phentermine/ purchase phentermine online] [http://mabeckha.6te.net/blog/bbw-anal.html bbw anal] [http://hohoffma.ueuo.com/cheap-international/ cheap international tickets] [http://etpeach.ueuo.com/directory/phone-number/ phone number look up] [http://wekaiser.6te.net/garden-clocks/ garden clocks] [http://etpeach.ueuo.com/directory/akai/ akai] [http://cueliza.ueuo.com/directory/cheerleaders.html cheerleaders] [http://krgiffor.orgfree.com/description/interior-decorating/ interior decorating] [http://metheres.6te.net/content/gay-sex.html gay sex video] [http://tesibrel.orgfree.com/blog/online-dating/ online dating services] [http://metheres.6te.net/content/commercial-properties.html commercial properties for sale] [http://cueliza.ueuo.com/directory/xxx-cartoon.html xxx cartoon] [http://etpeach.ueuo.com/directory/t/ t] [http://metheres.6te.net/content/free-software.html free software] [http://kupeddy.orgfree.com/web/doll.html doll] [http://ovap-poll.ueuo.com/html/plugins.html plugins] [http://hineill.ueuo.com/text/acura-integra/ acura integra] [http://weboland.6te.net/description/criminal-background/ criminal background check] [http://hohoffma.ueuo.com/matchmaking/ matchmaking] [http://wekaiser.6te.net/american-green/ american green card lottery] [http://weboland.6te.net/description/bad-buy/ bad buy car credit] [http://bacowen.orgfree.com/view/employment-insurance/ employment insurance] [http://cabanes.orgfree.com/small/jade-jewelry/ jade jewelry] [http://cueliza.ueuo.com/directory/jennifer-aniston.html jennifer aniston] [http://wekaiser.6te.net/used-vans/ used vans] [http://laneusus.ueuo.com/anime-porn.html anime porn] [http://tesibrel.orgfree.com/blog/international-online/ international online dating] [http://kupeddy.orgfree.com/web/augmentin.html augmentin] [http://cabanes.orgfree.com/small/christian-singles/ christian singles dating] [http://wekaiser.6te.net/womens-swimwear/ womens swimwear] [http://jacordia.6te.net/bathroom-tile.html bathroom tile design] [http://hineill.ueuo.com/text/continental-airline/ continental airline ticket] [http://mabeckha.6te.net/blog/free-crossword.html free crossword puzzles] [http://cueliza.ueuo.com/directory/manufactured-home.html manufactured home dealer] [http://bacowen.orgfree.com/view/birthday-greeting/ birthday greeting card] [http://elloveda.6te.net/description/six-second/ six second abs] [http://etpeach.ueuo.com/directory/psp-music/ psp music downloads] [http://hineill.ueuo.com/text/name-search/ name search] [http://krgiffor.orgfree.com/description/rabbit-vibrators/ rabbit vibrators] [http://tesibrel.orgfree.com/blog/handbag-wholesale/ handbag wholesale] [http://wekaiser.6te.net/people-magazine/ people magazine] [http://jacordia.6te.net/mastiff.html mastiff] [http://ovap-poll.ueuo.com/html/exchange-rate.html exchange rate] [http://wekaiser.6te.net/discount-hotel/ discount hotel coupons] [http://wekaiser.6te.net/halloween-costumes/ halloween costumes] [http://elloveda.6te.net/description/korean-airlines/ korean airlines] [http://elloveda.6te.net/description/cocktail-dress/ cocktail dress] [http://thsteger.ueuo.com/view/lesbian-love.html lesbian love] [http://cabanes.orgfree.com/small/canopy-bed/ canopy bed] [http://elloveda.6te.net/description/zithromax/ zithromax] [http://krgiffor.orgfree.com/description/carhartt/ carhartt] [http://hineill.ueuo.com/text/chatroom/ chatroom] 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 14:11, 2 November 2007
pension services ltd us military involvement in africa map city in pa enigma studio sailor moon download love spells reviewed milfs bbw blogs amg music reviews petite land world bank education data real yellow pages com mercy me stand for bike rack 2005 dress wedding toshiba customer support number easy elementary science fair project promise ring tradition lyrics for oh boy vivid dream picture of politicians vector force jose toledo miss kansas usa 2005 80 s cartoon international hair and nail show old english alphabet letter poetry competitions for children landing a plane ken burns biography the inn bed and breakfast vbhelper london magician what do rodents eat kids video chat rooms recall total information work and study abroad for canadians wwe champion belts romantic evening tip used currency counter image picture sex illinois special education scholarship australian female teachers history of teachers vestno mature appeal com rounded corner 45 degree sad away messages minnesota free public record java context api travelocity paris international financial reporting standards courses education residential specialist audio book free history the birth order theory kellly services sql server ignore pet loss crisis lines slovenia girls rod storage unit notice sample terminate product development process model internet providers austin mini golf orlando people care inc 60 thompson hotel in new york alaska weather underground the rift magazine astonishing maker money pulled my top north america united state arts and entertainment large size mother of the bride dress new york golf clubs treatment of bronchitis i gladly janet stevenson pc turntable imperial in las palace site vegas web lawerance university e m automotive new sex toy video personal income tax history myanmar flag international law article oral cavity sarah stone barton la bella y la attorney divorce houston in northshore high school houston look catalog 2006 crown victoria state laws of texas majority government in canada state education department verbal and non verbal tests international law marriage mls listing in va theeducationcenter antique fire engine video workstations amusement indiana park rebate gold miner vegas cingular wireless puppies for sale northern tools and equipment mens jeans estimate my tax return teen sex porn depression treatment guitar lessons hardcore black porn railings coffee makers free download norton anti virus ab lounge party invitation lowest fare airline ticket debt consolidation loan currency exchange cum sluts voyer sex large women bras arthritis early symptoms lowest airfare motrin ten commandments sex clip home heating microwave oven detroit airport crystal jewellery weddings dresses outboard motors mexico white page midi ringtone gas card forex trading huge vibrator gothic shoes cricket wireless phone service soccer players employee review forms newborn furniture audi a2 marriage man mesh underwear purchase phentermine online bbw anal cheap international tickets phone number look up garden clocks akai cheerleaders interior decorating gay sex video online dating services commercial properties for sale xxx cartoon t free software doll plugins acura integra criminal background check matchmaking american green card lottery bad buy car credit employment insurance jade jewelry jennifer aniston used vans anime porn international online dating augmentin christian singles dating womens swimwear bathroom tile design continental airline ticket free crossword puzzles manufactured home dealer birthday greeting card six second abs psp music downloads name search rabbit vibrators handbag wholesale people magazine mastiff exchange rate discount hotel coupons halloween costumes korean airlines cocktail dress lesbian love canopy bed zithromax carhartt chatroom 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.