Talk:String Handling Routines
stock broker training reverse phone directory sex cartoons car cock low rides hyperthyroidism free documents for filing divorce deramaxx hand bags toyota mexico selena cum shot dont date him itrip lcd review heated mattress pad flower tattoo designs huggies coupons breitling for bently cmi8330 audio adapter free download porn for women best rated anti virus software eggshell massivecock game house home medical supplies air gun business cards finn comfort shoe movies sex halloween crafts iwc watch turner rolex yacht master deck buy viagra now coffee and caffeine room decorations triton showers hot air balloon history carrier furnace free cingular ringtones maxim magazine pocket knife huge tit transmission parts endometriosis symptoms internet black jack dozer teen picture free templates sex free video pictures porn movies airline ticket bid images lesbians having sex clothing wholesale los angeles lisinopril hctz asian fuck internet auction massivecocks hydraulic press shirt cheap celexa petrol remote control cars soccer ball graphics xxx live cam no checking account required payday loan ford focus latin women dicyclomine interest rates chevy oem parts eva ionesco bondage video new balance outlet horny housewife elton john ticket free ringtones for metro pcs free mp3 files downloads furniture thomasville direct compute butalbital railings foreclosure houses in fl norelco shavers gay anal sex free download lesbian group sex christian dating principle norton anti virus update prices modular homes pergola designs mens louis vuitton wallets nissan part womens anal orgasm order lipitor sex dirty picture wedding jason mraz victoria styles shakespeare shiny panties renagade date pick free pee black erotica how to grow gourmet mushrooms kentucky derby tickets cheater ikki tousen tia bella lindsey lohan naked beaver hunt fort campbell sean hannity ripped abs summer altice naughty america airline schedules united airline registry repair kingfisher airline the kinison internet fraud hot males skunk spray arizona map ntsb ganesh dollar bill tan ass digimon rika fart sounds tony hawk underground 2 web site marketing strategy las vegas airport shuttle white men having sex with black women rachel stevens naked heat gain berita harian femfight the blood brothers young muscle boys bang bang my baby shot me down white ghetto booty herbal nutritional supplements ferrari liz hurley nude ranma porn drug pictures pregnant preteen liability insurance trans am barry white mp3 mp3 files german to english medical billing and coding helios hot girls pics jessica darlin hoodia for weight loss clothing optional busty asian secretary duct cleaning backyard pond elenasmodels discount plus size lingerie dvdshrink children bathing prom gowns lingerie sexy store chili recipe white claim jumpers national booboo bbs little pedo lolita model pics enhance sex drive urban porn blocker energy nude women finnteen young facial lancaster high schools sexual punishment citalopram free games download mind control stories sweet anime dryer booster fan sell my car selma hayek recovery pool parts sexy thong top celebs rooibos tea yahama 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.