regular expression

Discussion in 'XML' started by Asper Faner, Dec 19, 2006.

  1. Asper Faner

    Asper Faner Guest

    I seem to always have hard time understaing how this regular expression
    works, especially how on earth do people bring it up as part of
    computer programming language. Natural language processing seems not
    enough to explain by the way. Why no eliminate it ?
     
    Asper Faner, Dec 19, 2006
    #1
    1. Advertising

  2. Asper Faner

    Paddy Guest

    Asper Faner wrote:
    > I seem to always have hard time understaing how this regular expression
    > works, especially how on earth do people bring it up as part of
    > computer programming language. Natural language processing seems not
    > enough to explain by the way. Why no eliminate it ?

    If you try to eliminate what you don't understand you won't learn
    anything!

    I suggest that you put the learning of regexps aside for a while and
    come back to it 'later'.
     
    Paddy, Dec 19, 2006
    #2
    1. Advertising

  3. Asper Faner

    Erwin Moller Guest

    Asper Faner wrote:

    > I seem to always have hard time understaing how this regular expression
    > works, especially how on earth do people bring it up as part of
    > computer programming language. Natural language processing seems not
    > enough to explain by the way. Why no eliminate it ?


    I am sure you'll get an answer in one of zillion groups you posted this
    stupid question to...

    Regards,
    Erwin
     
    Erwin Moller, Dec 19, 2006
    #3
  4. Asper Faner

    Kleine Aap Guest

    Asper Faner wrote:

    > I seem to always have hard time understaing how this regular expression
    > works, especially how on earth do people bring it up as part of
    > computer programming language. Natural language processing seems not
    > enough to explain by the way. Why no eliminate it ?


    I.M.H.O. anyone that is not capable to grasp the concept of regular
    expressions should not attempt to write computer programs at all! My
    suggestion to you would be to find a job that involves working with your
    hands...
     
    Kleine Aap, Dec 19, 2006
    #4
  5. Asper Faner

    Roman Guest

    Asper Faner wrote:
    > I seem to always have hard time understaing how this regular expression
    > works, especially how on earth do people bring it up as part of
    > computer programming language. Natural language processing seems not
    > enough to explain by the way. Why no eliminate it ?
    >


    It has very much to do with computer programming. There is program flow,
    conditions, loops, variables.

    Roman
     
    Roman, Dec 22, 2006
    #5
  6. Asper Faner

    aejw.com Guest

    Also regular expressions are (pretty much) universal accross a ton of
    languages... even search engines now provide some support for regular
    expressions... I know its a bit of a headache, but keep trying to learn it
    mate. Once you have it wrapped you will never look back.

    Adam - http://www.aejw.com/?page=contact

    "Roman" <> wrote in message
    news:22Gih.18093$...
    > Asper Faner wrote:
    >> I seem to always have hard time understaing how this regular expression
    >> works, especially how on earth do people bring it up as part of
    >> computer programming language. Natural language processing seems not
    >> enough to explain by the way. Why no eliminate it ?
    >>

    >
    > It has very much to do with computer programming. There is program flow,
    > conditions, loops, variables.
    >
    > Roman
     
    aejw.com, Dec 22, 2006
    #6
  7. Reminder: anything crossposted across this many newsgroups, especially
    asking an inherently bogus question, is probably just trolling.

    If it's equally on topic everywhere, that means it's on topic nowhere.

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Dec 24, 2006
    #7
  8. Asper Faner

    Dustan Guest

    Kleine Aap wrote:
    > Asper Faner wrote:
    >
    > > I seem to always have hard time understaing how this regular expression
    > > works, especially how on earth do people bring it up as part of
    > > computer programming language. Natural language processing seems not
    > > enough to explain by the way. Why no eliminate it ?

    >
    > I.M.H.O. anyone that is not capable to grasp the concept of regular
    > expressions should not attempt to write computer programs at all! My
    > suggestion to you would be to find a job that involves working with your
    > hands...


    Your humble opinion doesn't get much ruder...

    Perhaps you meant "anyone that is not capable to grasp the concept of
    regular expressions after some experience with programming should not
    attempt to write computer programs at all!" Then at least newbies would
    have a leg to stand on.

    Otherwise, you're practically cutting off all entrances into the world
    of programming! The concept of regular expressions isn't exactly the
    simplest one out there. Just because you understood it immediately
    (which I'm guessing you did, considering your harsh response), doesn't
    mean others find the concept that simple.
     
    Dustan, Dec 24, 2006
    #8
  9. Asper Faner

    Stef Mientki Guest

    Dustan wrote:
    > Kleine Aap wrote:
    >> Asper Faner wrote:
    >>
    >>> I seem to always have hard time understaing how this regular expression
    >>> works, especially how on earth do people bring it up as part of
    >>> computer programming language. Natural language processing seems not
    >>> enough to explain by the way. Why no eliminate it ?

    >> I.M.H.O. anyone that is not capable to grasp the concept of regular
    >> expressions should not attempt to write computer programs at all! My
    >> suggestion to you would be to find a job that involves working with your
    >> hands...

    >
    > Your humble opinion doesn't get much ruder...
    >
    > Perhaps you meant "anyone that is not capable to grasp the concept of
    > regular expressions after some experience with programming should not
    > attempt to write computer programs at all!" Then at least newbies would
    > have a leg to stand on.
    >
    > Otherwise, you're practically cutting off all entrances into the world
    > of programming! The concept of regular expressions isn't exactly the
    > simplest one out there. Just because you understood it immediately
    > (which I'm guessing you did, considering your harsh response), doesn't
    > mean others find the concept that simple.
    >

    I agree, and in addition:

    (large) regular expressions are easy to write,
    but can be almost impossible to read back !

    I once had a program to generate and evaluate regular expressions,
    but can't find it anymore :-(

    If someone has links to regex generators/evaluators,
    I'ld be much obliged.

    cheers.
    Stef Mientki
     
    Stef Mientki, Dec 24, 2006
    #9
  10. On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote:

    > Dustan wrote:
    >> Kleine Aap wrote:
    >>> Asper Faner wrote:
    >>>
    >>>> I seem to always have hard time understaing how this regular expression
    >>>> works, especially how on earth do people bring it up as part of
    >>>> computer programming language. Natural language processing seems not
    >>>> enough to explain by the way. Why no eliminate it ?
    >>> I.M.H.O. anyone that is not capable to grasp the concept of regular
    >>> expressions should not attempt to write computer programs at all! My
    >>> suggestion to you would be to find a job that involves working with your
    >>> hands...

    >>
    >> Your humble opinion doesn't get much ruder...
    >>
    >> Perhaps you meant "anyone that is not capable to grasp the concept of
    >> regular expressions after some experience with programming should not
    >> attempt to write computer programs at all!" Then at least newbies would
    >> have a leg to stand on.
    >>
    >> Otherwise, you're practically cutting off all entrances into the world
    >> of programming! The concept of regular expressions isn't exactly the
    >> simplest one out there. Just because you understood it immediately
    >> (which I'm guessing you did, considering your harsh response), doesn't
    >> mean others find the concept that simple.
    >>

    > I agree, and in addition:
    >
    > (large) regular expressions are easy to write,
    > but can be almost impossible to read back !
    >
    > I once had a program to generate and evaluate regular expressions,
    > but can't find it anymore :-(
    >
    > If someone has links to regex generators/evaluators,
    > I'ld be much obliged.
    >
    > cheers.
    > Stef Mientki


    A good tool to write, test and analyse regexes is the Regulator, available
    here http://sourceforge.net/projects/regulator/

    A good reference site is http://www.regular-expressions.info/, with
    tutorials, examples and tools
    --
    Bits.Bytes
    http://bytes.thinkersroom.com
     
    Rad [Visual C# MVP], Dec 24, 2006
    #10
  11. Asper Faner

    Guest

    Rad [Visual C# MVP] wrote:
    > On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote:
    >
    > > Dustan wrote:
    > >> Kleine Aap wrote:
    > >>> Asper Faner wrote:
    > >>>
    > >>>> I seem to always have hard time understaing how this regular expression
    > >>>> works, especially how on earth do people bring it up as part of
    > >>>> computer programming language. Natural language processing seems not
    > >>>> enough to explain by the way. Why no eliminate it ?


    Hi folks, fairly new to the list(Python is my first programming
    language, so I'm fairly new to the world of programming too)but this is
    a question I've been wondering about since I started learning about the
    re module. Are regular expressions what makes mark up languages
    interpretable by webbrowsers?
     
    , Dec 25, 2006
    #11
  12. Asper Faner

    Dustan Guest

    wrote:
    > Rad [Visual C# MVP] wrote:
    > > On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote:
    > >
    > > > Dustan wrote:
    > > >> Kleine Aap wrote:
    > > >>> Asper Faner wrote:
    > > >>>
    > > >>>> I seem to always have hard time understaing how this regular expression
    > > >>>> works, especially how on earth do people bring it up as part of
    > > >>>> computer programming language. Natural language processing seems not
    > > >>>> enough to explain by the way. Why no eliminate it ?

    >
    > Hi folks, fairly new to the list(Python is my first programming
    > language, so I'm fairly new to the world of programming too)but this is
    > a question I've been wondering about since I started learning about the
    > re module. Are regular expressions what makes mark up languages
    > interpretable by webbrowsers?


    I don't actually know the answer, but my educated guess:

    Regular expressions are just the simplest way to parse any text, but
    there are other ways. Webbrowsers most likely depend on regular
    expressions just because it's a relatively quick and easy way to
    interpret the language.
     
    Dustan, Dec 25, 2006
    #12
  13. On Mon, 25 Dec 2006 06:17:00 -0800, wrote:

    > Hi folks, fairly new to the list(Python is my first programming
    > language, so I'm fairly new to the world of programming too)but this is
    > a question I've been wondering about since I started learning about the
    > re module. Are regular expressions what makes mark up languages
    > interpretable by webbrowsers?


    Web browsers have to render HTML, which implies they must be able
    to parse and interpret at least one markup language. _How_ they parse the
    markup is up to the browser developers.

    Since regular expressions are very good at certain types of text parsing,
    and are widely available, it is probable that regular expressions are used
    in some (many? all?) markup parsers, simply because it is widely available
    and is a good tool for some (but not all) parsing tasks. For example,
    Python's xmllib module uses reg exps to parse xml.

    Essentially, a regular expression engine is a super-charged "find"
    command on steroids. But that doesn't mean that reg exps are the only tool
    for the job. A markup parser doesn't necessarily need to use regexes.


    --
    Steven.
     
    Steven D'Aprano, Dec 25, 2006
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith-Earl
    Replies:
    1
    Views:
    474
    Mary Chipman
    Jun 15, 2004
  2. VSK
    Replies:
    2
    Views:
    2,379
  3. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    881
    Alan Moore
    Dec 2, 2005
  4. GIMME
    Replies:
    3
    Views:
    12,046
    vforvikash
    Dec 29, 2008
  5. Noman Shapiro
    Replies:
    0
    Views:
    254
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page