473,237 Members | 1,285 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

String Pattern Matching: regex and Python regex documentation

the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html

Note that, i've just made the terms of use clear.

Also, can anyone answer what is the precise terms of license of the
official python documentation? The official python.org doc site is not
clear.

Note also, that the regex syntax used by Perl is the same as Python.
So, this section
http://xahlee.org/perl-python/python...re-syntax.html
which contains clear explanation of regex syntax, will be of interest
to Perl programers as well.

If you are studying regex, you might also be interested in this lisp
doc:
http://xahlee.org/elisp/Regular-Expressions.html

Also note, that the regex syntax, is one of unix's $free$ fuckup that
has damaged a entire computer industry for decades. ($free$ as drugs
given to children)

For some examples of corrective steps, see:

• Scsh manual, Chapter 6: Pattern-matching strings with regular
expressions
http://www.scsh.net/docu/html/man-Z-H-7.html

• Mathematica Book, section 2.8.4 String Patterns
http://documents.wolfram.com/mathema.../section-2.8.4

Xah
xa*@xahlee.org
http://xahlee.org/

Sep 17 '06 #1
8 2211
[followup to c.l.py]

Xah Lee wrote:
the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html

Note that, i've just made the terms of use clear.

Also, can anyone answer what is the precise terms of license of the
official python documentation? The official python.org doc site is not
clear.
I would be interested in this information, too.
Note also, that the regex syntax used by Perl is the same as Python.
So, this section
http://xahlee.org/perl-python/python...re-syntax.html
which contains clear explanation of regex syntax, will be of interest
to Perl programers as well.
....

Your tutorial has helped me to write my first regular expression:

http://dev.lazaridis.com/base/changeset/60

your notes about documentation are interesting, too:

http://xahlee.org/perl-python/re-write_notes.html

I have some notes, too:

http://case.lazaridis.com/wiki/Docu

-

I would like to read more on your website, but the usability is
terrible, mainly due to the missing navigation.

What about an exchange?

I assist you with the navigation. you will just need apache
server-side-include and one file "navigation.html", which will contail
all of the navigation, very simple.

And you make an real life example for a python regular expression use-case:

i want to scan a text for this line:

[[CustomAttributes(this=4,that=34,name='peter')]]

picking "this=4" ...

and add the attributes to an object.

object = addCustomAttributes(text)

(ok, the regex part would be enouth).

..

--
http://lazaridis.com
Sep 22 '06 #2
Ilias Lazaridis wrote:
[followup to c.l.py]

Xah Lee wrote:
>>the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html

Note that, i've just made the terms of use clear.

Also, can anyone answer what is the precise terms of license of the
official python documentation? The official python.org doc site is not
clear.


I would be interested in this information, too.

>>Note also, that the regex syntax used by Perl is the same as Python.
So, this section
http://xahlee.org/perl-python/python...re-syntax.html
which contains clear explanation of regex syntax, will be of interest
to Perl programers as well.

....

Your tutorial has helped me to write my first regular expression:

http://dev.lazaridis.com/base/changeset/60

your notes about documentation are interesting, too:

http://xahlee.org/perl-python/re-write_notes.html

I have some notes, too:

http://case.lazaridis.com/wiki/Docu

-

I would like to read more on your website, but the usability is
terrible, mainly due to the missing navigation.

What about an exchange?

I assist you with the navigation. you will just need apache
server-side-include and one file "navigation.html", which will contail
all of the navigation, very simple.

And you make an real life example for a python regular expression use-case:

i want to scan a text for this line:

[[CustomAttributes(this=4,that=34,name='peter')]]

picking "this=4" ...

and add the attributes to an object.

object = addCustomAttributes(text)

(ok, the regex part would be enouth).

..
Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ...

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 22 '06 #3
"Steve Holden" <st***@holdenweb.comwrote in message
news:ma**************************************@pyth on.org...
<snip>
>
Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ...

regards
Steve
A sign of the End Times, perhaps?

-- Paul
Sep 22 '06 #4

Paul McGuire wrote:
"Steve Holden" <st***@holdenweb.comwrote in message
news:ma**************************************@pyth on.org...
<snip>

Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ...

regards
Steve

A sign of the End Times, perhaps?
Indeed. Armageddon outa here ;-)

Sep 22 '06 #5
Ilias Lazaridis wrote:
Xah Lee wrote:
>the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html
Yeah, sure, and the Perl regex documentation is available at 'perldoc
perlre'.
So what? Is that anything new or surprising?

jue
Sep 23 '06 #6
Xah Lee wrote:
« the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html ...»

Jürgen Exner wrote:
«Yeah, sure, and the Perl regex documentation is available at 'perldoc
perlre'. So what? Is that anything new or surprising?»

It is of interest and new, because it is a rewrite of Python's
documentation. And it is of interest to Perlers, because Perl and
Python uses the same regex syntax.

The purpose of this rewrite, is to fix Python's lousy documentation,
and to demonstrate a style of technical writing, where precision and
clarity is the prime directive.

It demonstrates a style of documentation, where the philosophy is
task-oriented and uses examples sans misgivings. (in this aspect, it
is similar to the style of Perl's official documentation.)

Further, the exposition style focuses on the manifestation of the
language elements, as a piece of mathematics, a style often found in
functional language's documentations. It is opposed to, treating the
language as a state machine or compiler engine, which are often
necessarily the approach of imperative languages's documentations.

This project was undertaken as a response to a challenge put forth to
me with a $100 reward, on 2005-04-12 on comp.lang.python newsgroup. I
never received the due reward.

Thanks.

Xah
xa*@xahlee.org
http://xahlee.org/

Sep 25 '06 #7
Xah Lee wrote:
Xah Lee wrote:
« the Python regex documentation is available at:
http://xahlee.org/perl-python/python...module-re.html ...»

Jürgen Exner wrote:
«Yeah, sure, and the Perl regex documentation is available at 'perldoc
perlre'. So what? Is that anything new or surprising?»

It is of interest and new, because it is a rewrite of Python's
documentation. And it is of interest to Perlers, because Perl and
Python uses the same regex syntax.

The purpose of this rewrite, is to fix Python's lousy documentation,
and to demonstrate a style of technical writing, where precision and
clarity is the prime directive.

It demonstrates a style of documentation, where the philosophy is
task-oriented and uses examples sans misgivings. (in this aspect, it
is similar to the style of Perl's official documentation.)

Further, the exposition style focuses on the manifestation of the
language elements, as a piece of mathematics, a style often found in
functional language's documentations. It is opposed to, treating the
language as a state machine or compiler engine, which are often
necessarily the approach of imperative languages's documentations.

This project was undertaken as a response to a challenge put forth to
me with a $100 reward, on 2005-04-12 on comp.lang.python newsgroup. I
never received the due reward.
Your reading skills must be terrible. You never received the reward
because it never became due. I offered you $100 if (I believe) five
regular readers of c.l.py wrote me to say your version was an
improvement on the original documentation.

So far (it's now been over a year since your publication, IIRC) not one
single person has written to me. So while your version of the docs may
have some merit, it certainly doesn't fulfil the advertised requirements
for the reward. Which therefore isn't due.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 25 '06 #8
Steve Holden wrote:
Xah Lee wrote:
....
This project was undertaken as a response to a challenge put forth to
me with a $100 reward, on 2005-04-12 on comp.lang.python newsgroup. I
never received the due reward.
Your reading skills must be terrible. You never received the reward
because it never became due. I offered you $100 if (I believe) five
regular readers of c.l.py wrote me to say your version was an
improvement on the original documentation.

So far (it's now been over a year since your publication, IIRC) not one
single person has written to me. So while your version of the docs may
have some merit, it certainly doesn't fulfil the advertised requirements
for the reward. Which therefore isn't due.
This justification sounds rational.

Possibly this should be published in a seperate topic, asking people to
review the 2 doc's, whilst giving publically(!) their vote.

Finally, all this can contribute to better python documentation (and,
sorry, python doc's need _really_ a rework).

--
http://lazaridis.com

Sep 26 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Thomas Mlynarczyk | last post by:
Which is the simplest way to remove all whitespace from a string? Is there a simpler method than a regex replace? Or how can I tell a regex pattern to ignore all whitespace in my subject string?...
9
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # Matching string patterns # # Sometimes you want to know if a string is of # particular pattern. Let's say in your website # you have converted all images...
11
by: Martin Robins | last post by:
I am trying to parse a string that is similar in form to an OLEDB connection string using regular expressions; in principle it is working, but certain character combinations in the string being...
29
by: zoro | last post by:
Hi, I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party string handling library that includes some very useful string functions, in particular I'm interested in BEFORE (return...
2
by: Ed Brown | last post by:
I'm working on a VB.Net application that needs to do quite a bit of string pattern matching, and am having problems using the "LIKE" operator to match the same string twice in the pattern. For...
17
by: Tom | last post by:
Is there such a thing as a CONTAINS for a string variable in VB.NET? For instance, I want to do something like the following: If strTest Contains ("A","B", "C") Then Debug.WriteLine("Found...
5
by: olaufr | last post by:
Hi, I'd need to perform simple pattern matching within a string using a list of possible patterns. For example, I want to know if the substring starting at position n matches any of the string I...
26
by: John Salerno | last post by:
I probably should find an RE group to post to, but my news server at work doesn't seem to have one, so I apologize. But this is in Python anyway :) So my question is, how can find all...
3
by: ommail | last post by:
Hi I wonder if regular expressions are in general sower than using classes like String and Char when used for validating/parsing text data? I've done some simple test (using IsMatch()) method...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.