From: Jean Nibee Date: 2009-04-13T23:49:48+09:00 Subject: Re: Regexp and using the matched value returned/found. Excellent all Thank you for the info. Using the block based notation worked much better. (Also, Robert thank you for the additional info, very informative). My next question is: Can someone direct me to a link to reading materials (my Google skills seem to stink as I am not finding what I expect) on the pattern matching variables I can use like $1 mentioned above as I am now trying to match the WHOLE pattern and not just the "dm,ph,ty,st" portion. So when I use: line.gsub!(swi_start){colorize_token($1)} The $1 only returns the aforementioned 2 char strings, I'd like to get the whole thing "SWIdmst" or "SWItynd" etc etc. Thanks. -- Posted via http://www.ruby-forum.com/.