Difference between revisions of "Talk:String Handling Routines"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
 
(115 intermediate revisions by 75 users not shown)
Line 1: Line 1:
[http://roma-uid.ifrance.com/lib/teen-free.htm teen free] [http://dtyc-seti.ifrance.com/new/rider-tomtom.htm rider tomtom navigatori gps] [http://mise-efaith.ifrance.com/goldenberg.htm goldenberg] [http://vlut-enya.ifrance.com/text/britisch/ britisch] [http://corvisn-rnum.ifrance.com/lib/nadia-parl/ nadia parl] [http://chri-ari.ifrance.com/directory/ragazzo-trieste.htm ragazzo trieste] [http://roma-uid.ifrance.com/lib/gioco-pc7.htm gioco pc recensione] [http://dtyc-seti.ifrance.com/new/lonsdale-giubbino.htm lonsdale giubbino] [http://mise-efaith.ifrance.com/dj-verona.htm dj verona] [http://dtyc-seti.ifrance.com/new/bambole-da.htm bambole da collezione] [http://carolli-nne.ifrance.com/text/vendo-abbigliamento/ vendo abbigliamento usato in firenze] [http://luzerna-reviver.ifrance.com/text/boby-mc.htm boby mc ferin] [http://citize-snips.ifrance.com/blog/fata-maria/ fata maria] [http://leg-erasin.ifrance.com/description/incontri-amatoriali.htm incontri amatoriali gratis] [http://vlut-enya.ifrance.com/text/aureon1/ aureon 7 1] [http://rut-hete.ifrance.com/directory/muro.htm muro] [http://carolli-nne.ifrance.com/text/video-decapitazione22/ video decapitazione giapponese] [http://luzerna-reviver.ifrance.com/text/monete-italia.htm monete italia repubblica serie] [http://carolli-nne.ifrance.com/text/stampanti1/ stampanti 10 15] [http://leg-erasin.ifrance.com/description/gli-appuntamenti.htm gli appuntamenti nintendo per il nuovo anno] [http://tanya-abramova.ifrance.com/html/la-ginestra1/ la ginestra] [http://chri-ari.ifrance.com/directory/jeans-diesel8.htm jeans diesel 30] [http://tanya-abramova.ifrance.com/html/maglioni-iceberg/ maglioni iceberg] [http://corvisn-rnum.ifrance.com/lib/buscar-en2/ buscar en escolar con] [http://luzerna-reviver.ifrance.com/text/linea-porno.htm linea porno gay] [http://roma-uid.ifrance.com/lib/un-giorno14.htm un giorno forse] [http://carolli-nne.ifrance.com/text/donna-sotto2/ donna sotto le stelle] [http://citize-snips.ifrance.com/blog/chacker/ chacker] [http://rjste-boat.ifrance.com/articles/davite-/ davite  delucchi snc] [http://leg-erasin.ifrance.com/description/mercedes-c30.htm mercedes c sw] [http://corvisn-rnum.ifrance.com/lib/mogli-calciatori2/ mogli calciatori russi] [http://leg-erasin.ifrance.com/description/telefonini-umts6.htm telefonini umts vodafone] [http://leg-erin.ifrance.com/new/los-suaves/ los suaves] [http://chri-ari.ifrance.com/directory/corvo-torvo.htm corvo torvo] [http://rut-hete.ifrance.com/directory/cheryl.htm cheryl] [http://leg-erasin.ifrance.com/description/www-hotelparadiso.htm www hotelparadiso] [http://tanya-abramova.ifrance.com/html/ags-tecnica/ ags (tecnica)] [http://mani-ndon.ifrance.com/new/macchina-caffe10/ macchina caffe ariete florence] [http://corvisn-rnum.ifrance.com/lib/pavimenti-e/ pavimenti e rivestimenti] [http://tanya-abramova.ifrance.com/html/la-bestia3/ la bestia nello spazio] [http://lezew0our.ifrance.com/description/clouds-above.htm clouds above] [http://away-warf.ifrance.com/new/gianfranco-ferre/ gianfranco ferre donna] [http://aipir-ine.ifrance.com/la-via11/ la via maestra] [http://leg-erasin.ifrance.com/description/negrita-rotolando.htm negrita rotolando] [http://aipir-ine.ifrance.com/ef-mm15/ ef 70200mm f 2 8l is usm] [http://vlut-enya.ifrance.com/text/mario-winans11/ mario winans testo i don t wanna know] [http://roma-uid.ifrance.com/lib/amplificatori-vintage.htm amplificatori vintage] [http://leg-erin.ifrance.com/new/prefabbricato-sicilia/ prefabbricato sicilia] [http://mise-efaith.ifrance.com/trucchi-giochi4.htm trucchi giochi xbox] [http://away-warf.ifrance.com/new/prade-antonio/ prade antonio] [http://corvisn-rnum.ifrance.com/lib/metri/ metri] [http://away-warf.ifrance.com/new/il-calendario5/ il calendario sexi di paola perego del 2] [http://vlut-enya.ifrance.com/text/foto-racconti2/ foto racconti incesti] [http://corvisn-rnum.ifrance.com/lib/sales-manager/ sales manager (regione lombardia  lecco provincia)] [http://rut-hete.ifrance.com/directory/ufficio-entrata.htm ufficio entrata] [http://rjste-boat.ifrance.com/articles/kiss-dvd3/ kiss dvd player dp1000] [http://leg-erasin.ifrance.com/description/hammer.htm hammer] [http://luzerna-reviver.ifrance.com/text/nicky-yam.htm nicky yam] [http://vlut-enya.ifrance.com/text/black-decker4/ black decker smerigliatrice] [http://luzerna-reviver.ifrance.com/text/anniversary-gift.htm anniversary gift] [http://rut-hete.ifrance.com/directory/k11.htm k 550] [http://leg-erin.ifrance.com/new/vacanze-ottobre/ vacanze ottobre] [http://citize-snips.ifrance.com/blog/un-po2/ un po di storia dei beatles] [http://mise-efaith.ifrance.com/nvidia-geforce45.htm nvidia geforce 6200 256 mb agp] [http://rjste-boat.ifrance.com/articles/giovanna-arco/ giovanna arco fleming] [http://leg-erasin.ifrance.com/description/photos-colocataires.htm photos colocataires m6] [http://leg-erin.ifrance.com/new/logitech-tastiera6/ logitech tastiera] [http://away-warf.ifrance.com/new/dragonstea-tin1/ dragonstea tin dei] [http://dtyc-seti.ifrance.com/new/auto-noleggio155.htm auto noleggio vigevano] [http://mani-ndon.ifrance.com/new/scandalo-croazia/ scandalo croazia] [http://rut-hete.ifrance.com/directory/hyundai-atos1.htm hyundai atos 1999] [http://leg-erasin.ifrance.com/description/netbus-pro.htm netbus pro 2 0] [http://rut-hete.ifrance.com/directory/gioco-euro1.htm gioco euro readers 2004] [http://citize-snips.ifrance.com/blog/motori-di6/ motori di ricrca] [http://corvisn-rnum.ifrance.com/lib/fz-1/ fz 97 p 1 ix] [http://aipir-ine.ifrance.com/il-libro9/ il libro degli inventari] [http://carolli-nne.ifrance.com/text/un-tipo1/ un tipo straordinario] [http://away-warf.ifrance.com/new/matures/ matures] [http://pho-enixt.ifrance.com/styles/very-large/ very large telescope] [http://tanya-abramova.ifrance.com/html/tu-no2/ tu no dei gemelli diversi] [http://carolli-nne.ifrance.com/text/forni-termozeta/ forni termozeta] [http://lezew0our.ifrance.com/description/james-daly.htm james daly] [http://carolli-nne.ifrance.com/text/versace-gonne/ versace gonne] [http://luzerna-reviver.ifrance.com/text/zou-zou.htm zou zou] [http://mise-efaith.ifrance.com/nike-calcetto2.htm nike calcetto pace vapor] [http://carolli-nne.ifrance.com/text/racconti-sesso5/ racconti sesso violento] [http://lezew0our.ifrance.com/description/gazettino.htm gazettino] [http://chri-ari.ifrance.com/directory/pietre.htm pietre] [http://luzerna-reviver.ifrance.com/text/www-ebayl.htm www ebayl it] [http://away-warf.ifrance.com/new/taedong/ taedong] [http://rjste-boat.ifrance.com/articles/stampanti-oki2/ stampanti oki led] [http://aipir-ine.ifrance.com/andamento-obbligazione/ andamento obbligazione] [http://mise-efaith.ifrance.com/baraonda-latina.htm baraonda latina] [http://dtyc-seti.ifrance.com/new/laserjet-aio.htm laserjet 2840aio] [http://roma-uid.ifrance.com/lib/ogg-the.htm ogg the sims] [http://roma-uid.ifrance.com/lib/baustelle-love.htm baustelle love affair] [http://chri-ari.ifrance.com/directory/nur-sas.htm nur sas] [http://leg-erin.ifrance.com/new/palle-al/ palle al balzo] [http://citize-snips.ifrance.com/blog/francisca/ francisca] [http://away-warf.ifrance.com/new/kuck-cerca/ kuck cerca bull] [http://vlut-enya.ifrance.com/text/mtaa/ mtaa 4511] [http://luzerna-reviver.ifrance.com/text/lampada-di.htm lampada di emergenza] [http://leg-erin.ifrance.com/new/microsoft-office22/ microsoft office ita] [http://luzerna-reviver.ifrance.com/text/shantung.htm shantung] [http://dtyc-seti.ifrance.com/new/madalina-manole.htm madalina manole] [http://aipir-ine.ifrance.com/laserjet8/ laserjet 1500] [http://luzerna-reviver.ifrance.com/text/lettore-registratore6.htm lettore registratore dvd vhs] [http://leg-erasin.ifrance.com/description/claudia-koll3.htm claudia koll in cosi fan tutte] [http://luzerna-reviver.ifrance.com/text/fiat-pd.htm fiat pd] [http://leg-erin.ifrance.com/new/macchina-cucito/ macchina cucito] [http://citize-snips.ifrance.com/blog/www-oficina/ www oficina g3 com br] [http://tanya-abramova.ifrance.com/html/microsoft-sasser/ microsoft sasser (af) worm removal tool] [http://luzerna-reviver.ifrance.com/text/midis-perreo.htm midis perreo gratis] [http://chri-ari.ifrance.com/directory/donne-in17.htm donne in cerca di sesso] [http://mani-ndon.ifrance.com/new/foto-donna6/ foto donna it] [http://luzerna-reviver.ifrance.com/text/psp-italia.htm psp italia] [http://leg-erasin.ifrance.com/description/dibujos-tridimensionales.htm dibujos tridimensionales] [http://pho-enixt.ifrance.com/styles/motorola-hs5/ motorola hs810] [http://corvisn-rnum.ifrance.com/lib/dx-divx/ dx50 divx] [http://leg-erasin.ifrance.com/description/el-debate.htm el debate de culiacan] [http://pho-enixt.ifrance.com/styles/trio-ct/ trio ct01] [http://kzer-ncer.ifrance.com/library/laurence-harvey.htm laurence harvey] [http://away-warf.ifrance.com/new/it-s22/ it s good be in love] [http://luzerna-reviver.ifrance.com/text/notebook-toshiba5.htm notebook toshiba sa60] [http://dtyc-seti.ifrance.com/new/annuncio-coppia6.htm annuncio coppia molise] [http://mise-efaith.ifrance.com/beastie-boys5.htm beastie boys video antology] [http://roma-uid.ifrance.com/lib/estrazione-lott.htm estrazione lott] [http://aipir-ine.ifrance.com/appunto-microbiologia/ appunto microbiologia] [http://tanya-abramova.ifrance.com/html/lisa-gerrard7/ lisa gerrard sacrifice] [http://corvisn-rnum.ifrance.com/lib/formato-a3/ formato a2 stampanti] [http://rut-hete.ifrance.com/directory/campi-e.htm campi e onde nell elettronica] [http://tanya-abramova.ifrance.com/html/liberatoria-per/ liberatoria per foto] [http://luzerna-reviver.ifrance.com/text/www-formaper.htm www formaper com] [http://roma-uid.ifrance.com/lib/xuandu.htm xuandu] [http://corvisn-rnum.ifrance.com/lib/viaccess4/ viaccess2] [http://rut-hete.ifrance.com/directory/la-tigre7.htm la tigre del sesso] [http://leg-erasin.ifrance.com/description/mediterraneo-colonna.htm mediterraneo colonna sonora film] [http://away-warf.ifrance.com/new/link-popularity/ link popularity] [http://vlut-enya.ifrance.com/text/concessionari-tributi/ concessionari tributi] [http://leg-erasin.ifrance.com/description/italia-sardegna4.htm italia sardegna vacanze in] [http://rjste-boat.ifrance.com/articles/schede-video45/ schede video nvidia 6800 gt] [http://vlut-enya.ifrance.com/text/mobilni-telefoni/ mobilni telefoni] [http://leg-erasin.ifrance.com/description/bracciale-topazio.htm bracciale topazio argento] [http://pho-enixt.ifrance.com/styles/siddharta-hesse/ siddharta hesse] [http://tanya-abramova.ifrance.com/html/culture-per/ culture per la comunicazione] [http://rjste-boat.ifrance.com/articles/peruta/ peruta] [http://mani-ndon.ifrance.com/new/i-like8/ i like it loud] [http://corvisn-rnum.ifrance.com/lib/asus-a18/ asus a716 cavo auto] [http://tanya-abramova.ifrance.com/html/www-ilpalermocalcio/ www ilpalermocalcio it] [http://corvisn-rnum.ifrance.com/lib/gogli-com/ gogli com] [http://rjste-boat.ifrance.com/articles/colle-genova/ colle genova] [http://luzerna-reviver.ifrance.com/text/videocamere.htm videocamere 0] [http://citize-snips.ifrance.com/blog/abit-ic1/ abit ic7] [http://citize-snips.ifrance.com/blog/lettore-dvd130/ lettore dvd divx dvdp244] [http://leg-erasin.ifrance.com/description/divisa-marina.htm divisa marina militare] [http://away-warf.ifrance.com/new/belkin-wireless/ belkin wireless pcmcia] [http://luzerna-reviver.ifrance.com/text/immagini-jpg.htm immagini jpg] [http://chri-ari.ifrance.com/directory/cercando-l.htm cercando l oro] [http://kzer-ncer.ifrance.com/library/plotter-hp9.htm plotter hp designjet a1] [http://carolli-nne.ifrance.com/text/gumbao/ gumbao] [http://mani-ndon.ifrance.com/new/modem-fax6/ modem fax esterno us robotics] [http://pho-enixt.ifrance.com/styles/american-conquest/ american conquest] [http://corvisn-rnum.ifrance.com/lib/vlaska-muzika/ vlaska muzika] [http://kzer-ncer.ifrance.com/library/rolex-daytona.htm rolex daytona] [http://leg-erin.ifrance.com/new/sesso-matto/ sesso matto] [http://carolli-nne.ifrance.com/text/aculaser-1/ aculaser 1100 toner] [http://aipir-ine.ifrance.com/atlante-zanichelli/ atlante zanichelli storico] [http://dtyc-seti.ifrance.com/new/exe.htm exe] [http://leg-erasin.ifrance.com/description/olympus-miu1.htm olympus miu] [http://corvisn-rnum.ifrance.com/lib/negozi-motori/ negozi motori] [http://leg-erin.ifrance.com/new/showgirl-italiana5/ showgirl italiana varia d f] [http://luzerna-reviver.ifrance.com/text/dieta-di.htm dieta di brad pitt] [http://corvisn-rnum.ifrance.com/lib/hotel-firenze/ hotel firenze albergo firenze] [http://aipir-ine.ifrance.com/isa-proxy/ isa proxy server] [http://carolli-nne.ifrance.com/text/donne-sicilia/ donne sicilia] [http://tanya-abramova.ifrance.com/html/geforce-go/ geforce go 6] [http://away-warf.ifrance.com/new/vola/ vola] [http://chri-ari.ifrance.com/directory/lingeries.htm lingeries] [http://dtyc-seti.ifrance.com/new/pantaloni2.htm pantaloni 40] [http://roma-uid.ifrance.com/lib/you-love.htm you love a woman] [http://mise-efaith.ifrance.com/sagre-ciliegia.htm sagre ciliegia] [http://carolli-nne.ifrance.com/text/side-by6/ side by silver] [http://roma-uid.ifrance.com/lib/prestito-artigiani.htm prestito artigiani] [http://mise-efaith.ifrance.com/diffusori-canton.htm diffusori canton] [http://citize-snips.ifrance.com/blog/sced-up/ sced up] [http://vlut-enya.ifrance.com/text/correre/ correre] [http://chri-ari.ifrance.com/directory/passat-variant6.htm passat variant 2 5 tdi] [http://lezew0our.ifrance.com/description/ode-al.htm ode al vino pablo neruda] [http://corvisn-rnum.ifrance.com/lib/forza-nelly/ forza nelly furtado] [http://tanya-abramova.ifrance.com/html/ridder/ ridder] [http://leg-erasin.ifrance.com/description/lettori-mp123.htm lettori mp3 lg] [http://away-warf.ifrance.com/new/ibm2/ ibm 1354] [http://leg-erin.ifrance.com/new/commisione-esami/ commisione esami di maturita] [http://corvisn-rnum.ifrance.com/lib/midi-antoine/ midi antoine la tramontana] [http://carolli-nne.ifrance.com/text/rum-zacapa/ rum zacapa] [http://mise-efaith.ifrance.com/vivaldi-la.htm vivaldi la notte] [http://mani-ndon.ifrance.com/new/cisl-modena/ cisl modena] [http://mani-ndon.ifrance.com/new/processori-intel7/ processori intel dualcore extreme] [http://pho-enixt.ifrance.com/styles/inciclopedia-arianna/ inciclopedia arianna] [http://pho-enixt.ifrance.com/styles/facciolini/ facciolini] So wtf does group_string actually do?  The linked "descriptive" post has an utterly unhelpful example.  Has anyone ever used it for anything?
+
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.
Line 50: Line 50:
  
 
I personally haven't used it. Would be used in parsing a page by hand.
 
I personally haven't used it. Would be used in parsing a page by hand.
 +
 +
 +
== Regular expressions ==
 +
 +
Finally! As of this moment, every single function has a page on this wiki except for the regular expression functions. ''(Much cheering!)'' Part of the problem with making pages for them is that a whole ream of background information is necessary to use them. I can see several approaches that we can take to this. I hope that we can discuss which tact to take:
 +
#Create a new category and page for regular expressions where we discuss how to use them in detail.
 +
#At the top of the Regular expressions section on this page, we post a link to another site that discusses how to use them. Obviously this is easiest. Then we assume that information is understood by the reader.
 +
#* http://www.regular-expressions.info/
 +
#* http://java.sun.com/docs/books/tutorial/essential/regex/index.html
 +
#Assume information about the nature of regular expressions and how to use regular expression functions is both known and just discuss the specifics of each function.
 +
Personally, I favor creating a page for regular expressions which starts with a link to a site that explains how to create regular expressions. Then the page explains how they can be used in ash.
 +
--[[User:Bale|Bale]] 10:01, 6 May 2010 (UTC)
 +
 +
I'm leaning toward not adding in another category on the main page; it's getting cluttered as-is. However, I'm 100% the idea of linking to a dedicated page with more info & links. For the user comfortable with regex, they can go to the strings page and just follow links. For others, they can go to the regex page first. However, I'm not a programmer, so I don't know if most would consider regex to be a sub-set of string handling, or its own category. I'd go by whatever is considered "standard" for that.
 +
 +
If we go with complete separation, I'd probably want to have a link to said page on the string handling page, and perhaps not even include it on the Main Page. I dunno. Honestly, I'm fine leaving this to whoever feels comfortable enough with regex to add said function pages.
 +
 +
Whichever approach is taken, I agree that we shouldn't include all of the background info on each page. Matche(r)s, groups, etc. should be briefly defined on their specific pages, but otherwise left to a general description page or assumed to be known with references provided (on the category / sub-category page). Explaining each concept on every page is a bit absurd. (It would be like giving a definition of string on every function page that accepts a parameter of or returns a string; we have other "general info" pages for this reason.)
 +
 +
Also, congrats & thanks on reaching this major milestone! --[[User:StDoodle|StDoodle (#1059825)]] 15:48, 6 May 2010 (UTC)
 +
 +
* Good points. Regexp are a subset of string handling so we can keep them on that page, but link to a page of regexp information at the top of the regexp page. If we decide to have regexp information on this site. That would be a pretty good solution. How much detail should we go into on the regexp page? Just basic information and a few links for the user to learn more? Or just assume that they are understood as well as string? --[[User:Bale|Bale]] 21:11, 6 May 2010 (UTC)
 +
 +
 +
The way you're currently going with is is a.o.k. by me. I wouldn't add too much to the dedicated page; I'd prefer additional tutorials & reference material to "original" content, for the most part. Mostly 'cause I see people fitting into the following groups re: regex;
 +
* Those who will never get it; it doesn't matter what we do for this group
 +
* Those who already get it; again, doesn't matter what we do
 +
* Those who are capable of getting it, given adequate info
 +
** Adequate is, for the most of people in this category, going to be far more than we really want to get in to (I know some people who are very comfortable with regex who STILL keep a cheat-cheat or bookmark for some stuff)
 +
** I don't want to spend 1k wiki-hours (that's an official metric now, dontchaknow?) on stuff that's been done well elsewhere when there's a lot of mafia (non-ash) stuff left to document; priorities, bang-for-your-buck, etc.
 +
 +
So yeah, keep up what you're doing basically. Flesh out quick coverage of the basics on the Regex page, add more links if you find ones that may also be helpful, but beyond that, don't worry too much about it. --[[User:StDoodle|StDoodle (#1059825)]] 04:09, 7 May 2010 (UTC)
 +
 +
Edit to add:
 +
 +
There is one minor additional note. As you note on the Regex page & I've seen elsewhere, ash regex is just a wrapper for java regex. As such, there's absolutely no reason to cover the same ground (I'm fairly sure java has better documentation resources than mafia :P ) EXCEPT it might be nice to give some "advanced info" that points out exactly how the ash equivalents map to their java counterparts. This isn't high-priority, but is the only thing beyond links and very basic coverage that I can see being worthwhile. --[[User:StDoodle|StDoodle (#1059825)]] 04:12, 7 May 2010 (UTC)
 +
 +
Do you think I'm adding too much detail? Should I trim back and rely on off-site tutorials? I think you can see right now about how much of a skim through regexes I'm planning to do. Should I skip it? --[[User:Bale|Bale]] 04:37, 7 May 2010 (UTC)
 +
 +
Well, first and foremost, don't worry a whole lot about having too much info, as long as it's accurate. I'm just saying that at the point that it stops flowing naturally and you have to stop and think hard about it, skim over the rest and point to tutorials. If the biggest flaw in this wiki ends up being that it duplicates information that can be learned elsewhere, I'll be able to live with that. --[[User:StDoodle|StDoodle (#1059825)]] 06:17, 7 May 2010 (UTC)
 +
* LOL! Very philosophical of you. ^_^ --[[User:Bale|Bale]] 06:40, 7 May 2010 (UTC)

Latest revision as of 06:40, 7 May 2010

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.


Regular expressions

Finally! As of this moment, every single function has a page on this wiki except for the regular expression functions. (Much cheering!) Part of the problem with making pages for them is that a whole ream of background information is necessary to use them. I can see several approaches that we can take to this. I hope that we can discuss which tact to take:

  1. Create a new category and page for regular expressions where we discuss how to use them in detail.
  2. At the top of the Regular expressions section on this page, we post a link to another site that discusses how to use them. Obviously this is easiest. Then we assume that information is understood by the reader.
  3. Assume information about the nature of regular expressions and how to use regular expression functions is both known and just discuss the specifics of each function.

Personally, I favor creating a page for regular expressions which starts with a link to a site that explains how to create regular expressions. Then the page explains how they can be used in ash. --Bale 10:01, 6 May 2010 (UTC)

I'm leaning toward not adding in another category on the main page; it's getting cluttered as-is. However, I'm 100% the idea of linking to a dedicated page with more info & links. For the user comfortable with regex, they can go to the strings page and just follow links. For others, they can go to the regex page first. However, I'm not a programmer, so I don't know if most would consider regex to be a sub-set of string handling, or its own category. I'd go by whatever is considered "standard" for that.

If we go with complete separation, I'd probably want to have a link to said page on the string handling page, and perhaps not even include it on the Main Page. I dunno. Honestly, I'm fine leaving this to whoever feels comfortable enough with regex to add said function pages.

Whichever approach is taken, I agree that we shouldn't include all of the background info on each page. Matche(r)s, groups, etc. should be briefly defined on their specific pages, but otherwise left to a general description page or assumed to be known with references provided (on the category / sub-category page). Explaining each concept on every page is a bit absurd. (It would be like giving a definition of string on every function page that accepts a parameter of or returns a string; we have other "general info" pages for this reason.)

Also, congrats & thanks on reaching this major milestone! --StDoodle (#1059825) 15:48, 6 May 2010 (UTC)

  • Good points. Regexp are a subset of string handling so we can keep them on that page, but link to a page of regexp information at the top of the regexp page. If we decide to have regexp information on this site. That would be a pretty good solution. How much detail should we go into on the regexp page? Just basic information and a few links for the user to learn more? Or just assume that they are understood as well as string? --Bale 21:11, 6 May 2010 (UTC)


The way you're currently going with is is a.o.k. by me. I wouldn't add too much to the dedicated page; I'd prefer additional tutorials & reference material to "original" content, for the most part. Mostly 'cause I see people fitting into the following groups re: regex;

  • Those who will never get it; it doesn't matter what we do for this group
  • Those who already get it; again, doesn't matter what we do
  • Those who are capable of getting it, given adequate info
    • Adequate is, for the most of people in this category, going to be far more than we really want to get in to (I know some people who are very comfortable with regex who STILL keep a cheat-cheat or bookmark for some stuff)
    • I don't want to spend 1k wiki-hours (that's an official metric now, dontchaknow?) on stuff that's been done well elsewhere when there's a lot of mafia (non-ash) stuff left to document; priorities, bang-for-your-buck, etc.

So yeah, keep up what you're doing basically. Flesh out quick coverage of the basics on the Regex page, add more links if you find ones that may also be helpful, but beyond that, don't worry too much about it. --StDoodle (#1059825) 04:09, 7 May 2010 (UTC)

Edit to add:

There is one minor additional note. As you note on the Regex page & I've seen elsewhere, ash regex is just a wrapper for java regex. As such, there's absolutely no reason to cover the same ground (I'm fairly sure java has better documentation resources than mafia :P ) EXCEPT it might be nice to give some "advanced info" that points out exactly how the ash equivalents map to their java counterparts. This isn't high-priority, but is the only thing beyond links and very basic coverage that I can see being worthwhile. --StDoodle (#1059825) 04:12, 7 May 2010 (UTC)

Do you think I'm adding too much detail? Should I trim back and rely on off-site tutorials? I think you can see right now about how much of a skim through regexes I'm planning to do. Should I skip it? --Bale 04:37, 7 May 2010 (UTC)

Well, first and foremost, don't worry a whole lot about having too much info, as long as it's accurate. I'm just saying that at the point that it stops flowing naturally and you have to stop and think hard about it, skim over the rest and point to tutorials. If the biggest flaw in this wiki ends up being that it duplicates information that can be learned elsewhere, I'll be able to live with that. --StDoodle (#1059825) 06:17, 7 May 2010 (UTC)

  • LOL! Very philosophical of you. ^_^ --Bale 06:40, 7 May 2010 (UTC)