Re: Help needed with regular expressions

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/plain)
Delete this message
Reply to this message
Author: der.hans
Date:  
To: Main PLUG discussion list
Subject: Re: Help needed with regular expressions
Am 25. Jan, 2006 schwätzte John Wheat so:

> I am seeking help to memorize, utilize, and gain basic proficiency with
> regular expressions and sed, grep, egrep searches and the like. When I read
> something like \^{a-r}\ my brain for lack of a bettwer way to say it believes
> this to be a ctl-d and stops all processing. So if you have a tool or an
> acronym or perhaps a silly song you have made up that would help me learn
> this aspect of CLI interaction would you please share that information with
> me.


Use them :).

Presuming you're using them for scripts make sure to document:

1. what you're trying to match
2. what the regex is supposed to be doing
3. what each part of the regex is supposed to be doing

As you get better 3 can go away for simple regexes, but I suggest
always doing 1 and 2. I also suggest continuing with 3 for complex or
'cool' regexes.

You might also want to do:

4. give samples that do or don't match and why

ciao,

der.hans
-- 
#  https://www.LuftHans.com/        http://www.CiscoLearning.org/
#  Join the League of Professional System Administrators! https://LOPSA.org/
#  If you're not learning, you're not living. - der.hans
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss