who can give me the detailed introduction of re modle?

S

softwindow

the re module is too large and difficult to study

i need a detaild introduction.
 
G

Gary Herron

softwindow said:
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
 
V

vaibhav

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 :)
-vaibhav
 
G

gene tani

softwindow said:
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/s=2472/uni1037388368795/

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

You have everything you need
 
J

John Salerno

softwindow said:
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/
 
P

Paul McGuire

softwindow said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,298
Messages
2,571,540
Members
48,275
Latest member
tetedenuit01

Latest Threads

Top