469,645 Members | 1,941 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

who can give me the detailed introduction of re modle?

the re module is too large and difficult to study

i need a detaild introduction.

May 19 '06 #1
9 959
softwindow wrote:
the re module is too large and difficult to study

i need a detaild introduction.

That's not the kind of question that's likely to get a useful response
from an all volunteer newsgroup community, even one with as friendly a
reputations as this one.

Here's my suggestion:

Read the manual page at http://docs.python.org/lib/module-re.html, then
try to apply it to a specific problem you'd like to solve with regular
expressions. Any problems you run into at that point will be quite
specific. If you list the problem you tried to solve, your solution
attempt, and what failed, you will likely get lots of useful answers here.

But you have to take the first step. P.S. The re module is really not
all *that* difficult.

Gary Herron
May 19 '06 #2
easy and convenient way to get a good introduction for any module
[especially if ur stuck and dont have internet connectivity]:

1. start python interpreter
$ python

2. import the module and ask it for help :-)
import re
help(re)


-vaibhav

May 19 '06 #3
thanks for your advice!

:)

May 19 '06 #4
On 18 May 2006 22:50:24 -0700, softwindow <so********@gmail.com> wrote:
the re module is too large and difficult to study

i need a detaild introduction.


<http://gnosis.cx/publish/programming/regular_expressions.html>

--
Cheers,
Simon B,
si***@brunningonline.net,
http://www.brunningonline.net/simon/blog/
May 19 '06 #5
softwindow wrote:
the re module is too large and difficult to study

i need a detaild introduction.

http://www.amk.ca/python/howto/regex/

Kent
May 19 '06 #6
softwindow wrote:
the re module is too large and difficult to study
Too bad.
i need a detaild introduction.


That's fine. Then write it. Or pay someone to do so.

Just for the record : that's the only answers you would have get on most
usenet groups. Hopefully, c.l.py is a very friendly and tolerant newsgroup.

Seriously, do yourself a favour, read this:
http://www.catb.org/~esr/faqs/smart-questions.html

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
May 19 '06 #7

softwindow wrote:
the re module is too large and difficult to study
it's powerful, takes a little time to work with. Make yourself aware
of the VERBOSE switch, RE debuggers in komodo and Wing, string
functions/methods and when you need a full parser, also

http://www.awaretek.com/tutorials.html#regular
http://en.wikibooks.org/wiki/Programming:Python_Strings
http://www.regexlib.com/Default.aspx
http://www.regular-expressions.info/python.html
http://www.unixreview.com/documents/...1037388368795/

http://diveintopython.org/regular_ex....html#re.intro
i need a detaild introduction.


You have everything you need

May 19 '06 #8
softwindow wrote:
the re module is too large and difficult to study

i need a detaild introduction.


I don't know what your experience has been so far, but I have almost no
programming experience beyond what I've taught myself, and I found the
re module very easy to understand after reading the docs. Just go
through each page slowly. Start with the syntax, then read about the
functions and objects (and their methods) and write a few REs yourself.

I hate to say it, but it's actually kind of fun! :) And not nearly as
difficult as I thought it would be when I first encountered REs.

You can also consult this place: http://www.regular-expressions.info/
May 19 '06 #9
"softwindow" <so********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
the re module is too large and difficult to study

i need a detaild introduction.


Sorry, but your post just sounds too much like it's in the "I'm too lazy to
figure
this out for myself, just spoon-feed me the answer" category.

How do you know you need the re module? Is there a particular problem you
are trying to solve? Have you made any effort on your own before just
posting this open-ended request? How did it go?

Is it possible that your problem could be solved with something less exotic,
perhaps some combination of str.find() and str.split()? It may be simpler
to wield a rapier string function than to haul out the chainsaw of re's.

Yes, re's are mysterious and cryptic, and there is a whole cottage industry
of books and websites out there to help you compose your own special re
string, filled with '?'s, '.'s, '+'s, '*'s, and many, many '\'s.

Are you familiar with Google? Try searching for, um, "Python re module" or
"Python regular expressions". You are bound to find many pages of
introductory, intermediate, expert, exemplary, and diabolical material.

-- Paul
May 19 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Scott Carter | last post: by
14 posts views Thread by Cletis Tout | last post: by
1 post views Thread by Xiaoshen Li | last post: by
29 posts views Thread by Martin Schmied | last post: by
5 posts views Thread by Konfused | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.