http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html
--------- QUOTE The module defines several functions, constants, and an exception. Some of the functions are simplified versions of the full featured methods for compiled regular expressions. Most non-trivial applications always use the compiled form UNQUOTE What does a programer who wants to use regex gets out from this piece of motherfucking irrevalent drivel? ---------- QUOTE compile( pattern[, flags]) Compile a regular expression pattern into a regular expression object, which can be used for matching using its match() and search() methods, described below. The expression's behaviour can be modified by specifying a flags value. Values can be any of the following variables, combined using bitwise OR (the | operator). UNQUOTE What exactly is it fucking saying? I wanted to use regex to find & replace on text. I've read in a file. Trying to reading this fucking doc is a pain in the ass. What are these "flags"? Do i do re.compile(r'mypat','M') or re.compile(r'mypat',M) or perhaps re.compile(r'mypat',re.M) The M isn't a fucking variable. Why does the doc incompetently use that term? And what the fuck is it unclearly meant by "OR" operator with the mother fucking bitwise jargon? All a person reading regex really wanted is to see how to use a string pattern and replace it with another. The fucking doc cannot be possibly fucking worsely written. Fuck the mother fucking coders in the IT industry. So, is re.compile(r'mypat','M') re.compile(r'mypat','MULTILINE') equivalent? and, by that fucking bitwise shit is it meant to say like re.compile(r'mypat','M'|'U') ? why cannot this piece of shit writing give a single example of usage? and motherfucking confusedly organized, with fucking variable terms the writer don't fucking understand, and meanwhile always trying to sound big asshole and don't stop at masturbation by mention a regex book and not hesitate to mention another language Perl. Fucking morons. for a exposition of IT's fucking stupid docs and their fuckhead coders, see: http://xahlee.org/Periodic_dosage_dir/t2/xlali_skami_cukta.html a cleaned up account of this post will be appended to the above exposition. -------- One final piece of advice here to sober up the fuckheads who are currently offended and defiant: you want to ask yourself this question: Can a seasoned programer, who is expert at least 2 languages, who is also a expert at Perl and knew regex well, and who has also read the official Python tutorial and has written at least 10 simple python programs over a span of a month, can such a person, who have not yet used regex in Python but now wants to use regex in Python and have just read the doc, must he, resort to many trial and error to see exactly what the doc is talking about? But, can this doc be (re-)written effectively and easily so that any programers needn't do trial'n'error post-reading? The answer to the questions are resounding yeses, you fucking asses. paypal me a hundred dollars and i'll rewrite the whole re doc in a few hours. Fuck you the standard IT morons. Excuse me for i didn't have time to write a more coherent and detailed analysis of the stupidities of the re doc. Xah [EMAIL PROTECTED] â http://xahlee.org/PageTwo_dir/more.html â -- http://mail.python.org/mailman/listinfo/python-list