[prog] Learn Code the Hard Way - RegEx

Miriam English mim at miriam-english.org
Fri Dec 16 01:13:16 UTC 2011


There is a regular Expressions learning tool among the .pet Puppy 
packages on Ibiblio:
ftp://distro.ibiblio.org/puppylinux/pet_packages-3/regexpviewer-0.1.pet

The .pet packages are really .tgz files. Just rename the file, adding a 
".tgz" extension and extract it. There will be an error because Puppy 
includes package info, but you don't need that if using a different 
distro, so ignore the error. Then copy the "usr" folder to /usr on your 
machine.

Now typing in at the terminal "regexpviewershell" (without quotes of 
course) will run the program. You must have tcl/tk installed, but most 
Linuxes do these days.

Also, and probably more useful, is a sourceforge project called 
"regexxer" which can be used to understand how regular expressions work. 
It will modify the text files you load into it, so practice on spare 
text files.

I've found it easiest to learn regular expressions by working my way 
through the examples in the famous sed oneliners text file now on 
sourceforge
http://sed.sourceforge.net/sed1line.txt

I try to keep a file of my successes so I can go back and remind myself 
what works.

Be aware that various tools have slightly different variations of regex 
-- sed, awk, gawk, grep, perl, python can all differ in subtle ways that 
produce dramatically different results.

Cheers,

	- Miriam


Linda Knapp wrote:
> I'm woefully deficient in my understanding of regular expressions. In order
> to start fixing this I'm going to be going through the RegEx lessons on
> learncodethehardway.com.
>
> I'd love to have other chixen join me in going through the lessons. Maybe
> we can post questions to the programming mailing list or irc channel.
>
> Anyone else up for it? I know most of us are pretty busy so doing this in a
> self paced manner would probably work best.
>
> -Linda
> _______________________________________________
> Grrltalk mailing list
> Grrltalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/grrltalk
>
>


-- 
If you don't have any failures then you're not trying hard enough.
  - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs:   http://miriam-e.dreamwidth.org
          http://miriam-e.livejournal.com


More information about the Programming mailing list