String Pattern Matching: regex and Python regex documentation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Xah Lee

    #1

    String Pattern Matching: regex and Python regex documentation

    the Python regex documentation is available at:


    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

    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:


    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


    • Mathematica Book, section 2.8.4 String Patterns


    Xah
    xah@xahlee.org
    ∑ http://xahlee.org/

  • Ilias Lazaridis

    #2
    Re: String Pattern Matching: regex and Python regex documentation

    [followup to c.l.py]

    Xah Lee wrote:
    the Python regex documentation is available at:

    >
    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

    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:



    your notes about documentation are interesting, too:



    I have some notes, too:



    -

    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.htm l", 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:

    [[CustomAttribute s(this=4,that=3 4,name='peter')]]

    picking "this=4" ...

    and add the attributes to an object.

    object = addCustomAttrib utes(text)

    (ok, the regex part would be enouth).

    ..

    --

    Comment

    • Steve Holden

      #3
      Re: String Pattern Matching: regex and Python regex documentation

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

      >
      your notes about documentation are interesting, too:
      >

      >
      I have some notes, too:
      >

      >
      -
      >
      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.htm l", 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:
      >
      [[CustomAttribute s(this=4,that=3 4,name='peter')]]
      >
      picking "this=4" ...
      >
      and add the attributes to an object.
      >
      object = addCustomAttrib utes(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

      Comment

      • Paul McGuire

        #4
        Re: String Pattern Matching: regex and Python regex documentation

        "Steve Holden" <steve@holdenwe b.comwrote in message
        news:mailman.47 6.1158952713.10 491.python-list@python.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


        Comment

        • John Machin

          #5
          Re: String Pattern Matching: regex and Python regex documentation


          Paul McGuire wrote:
          "Steve Holden" <steve@holdenwe b.comwrote in message
          news:mailman.47 6.1158952713.10 491.python-list@python.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 ;-)

          Comment

          • Jürgen Exner

            #6
            Re: String Pattern Matching: regex and Python regex documentation

            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


            Comment

            • Xah Lee

              #7
              Re: String Pattern Matching: regex and Python regex documentation

              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.pytho n newsgroup. I
              never received the due reward.

              Thanks.

              Xah
              xah@xahlee.org
              ∑ http://xahlee.org/

              Comment

              • Steve Holden

                #8
                Re: String Pattern Matching: regex and Python regex documentation

                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.pytho n 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

                Comment

                • Ilias Lazaridis

                  #9
                  Re: String Pattern Matching: regex and Python regex documentation

                  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.pytho n 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).

                  --


                  Comment

                  Working...