what is regular expression

Discussion in 'C Programming' started by MJ, Jul 12, 2005.

  1. MJ

    MJ Guest

    HI
    I want to know what is mean by regular expression in C
    Mayur
     
    MJ, Jul 12, 2005
    #1
    1. Advertising

  2. MJ

    SM Ryan Guest

    "MJ" <> wrote:
    # HI
    # I want to know what is mean by regular expression in C

    A regular expression is pattern with certain restrictions (it
    cannot match nested parentheses) that identifies a set of strings.
    There are various regular expression packages available, each
    with small variations in how the regular expression is expressed.

    A regular expression is equivalent to a finite state machine;
    if you want to recognise a predetermined RE in a C program, you
    can convert the expression to an FSM and encode it with gotos.

    --
    SM Ryan http://www.rawbw.com/~wyrmwif/
    We found a loophole; they can't keep us out anymore.
     
    SM Ryan, Jul 12, 2005
    #2
    1. Advertising

  3. "MJ" <> writes:
    > I want to know what is mean by regular expression in C


    Nothing. The C language has no support for regular expressions,
    though there are libraries (some that happen to be written in C) that
    support regular expressions.

    A Google search for "regular expressions" is likely to be more
    fruitful than posting to a newsgroup where the question is off-topic.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Jul 12, 2005
    #3
  4. In article <>,
    MJ <> wrote:
    >HI
    >I want to know what is mean by regular expression in C


    C has expressions (e.g., 2+2) and they are used regularly.
    In fact, it is pretty hard to write a C program without using at least one
    such expression.

    HTH
     
    Kenny McCormack, Jul 12, 2005
    #4
  5. MJ

    CBFalconer Guest

    MJ wrote:
    >
    > I want to know what is mean by regular expression in C


    It has to do with the lack of facial grimaces following a long bout
    of constipation. From which you may conclude that this has nothing
    to do with the C language, and that you are off-topic here. Such
    books as "Software Tools", or "The Practice of Programming", etc.
    may produce some clues.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
     
    CBFalconer, Jul 12, 2005
    #5
  6. MJ

    SM Ryan Guest

    (Kenny McCormack) wrote:
    # In article <>,
    # MJ <> wrote:
    # >HI
    # >I want to know what is mean by regular expression in C
    #
    # C has expressions (e.g., 2+2) and they are used regularly.
    # In fact, it is pretty hard to write a C program without using at least one
    # such expression.

    Unable to settle for mere obnoxiousness, you now have to deliberately
    spread misinformation.

    --
    SM Ryan http://www.rawbw.com/~wyrmwif/
    One of the drawbacks of being a martyr is that you have to die.
     
    SM Ryan, Jul 12, 2005
    #6
  7. MJ

    Sensei Guest

    On 2005-07-12 01:40:36 -0500, "MJ" <> said:

    > HI I want to know what is mean by regular expression in C Mayur


    C has *no* knowledge of regexp. A regular expression is a string that
    describes a language that can be recognized by a finite-state machine,
    For better knowledge, google for it, or probably better, wikipedia.

    If you want a library that helps you in dealing with regexp, it's
    another topic...

    --
    Sensei <>

    cd /pub
    more beer
     
    Sensei, Jul 12, 2005
    #7
  8. In article <>,
    SM Ryan <> wrote:
    > (Kenny McCormack) wrote:
    ># In article <>,
    ># MJ <> wrote:
    ># >HI
    ># >I want to know what is mean by regular expression in C
    >#
    ># C has expressions (e.g., 2+2) and they are used regularly.
    ># In fact, it is pretty hard to write a C program without using at least one
    ># such expression.
    >
    >Unable to settle for mere obnoxiousness, you now have to deliberately
    >spread misinformation.


    What misinformation? What did I say that was either untrue or OT?

    Please be specific. Give examples.
     
    Kenny McCormack, Jul 12, 2005
    #8
  9. MJ

    Clint Olsen Guest

    On 2005-07-12, MJ <> wrote:
    > I want to know what is mean by regular expression in C
    > Mayur


    Regular expressions are actually more of a language topic. You'd probably
    have better luck learning about those in comp.compilers and
    comp.programming. Having said that, there are library routines for
    creating and manipulating regular expressions in C, but they are not part
    of the standard and thus not really topical to a group focused on ANSI C.

    See regcomp(1) for more info on the C routines on your favorite UNIX
    variant.

    -Clint
     
    Clint Olsen, Jul 12, 2005
    #9
  10. MJ

    CBFalconer Guest

    Kenny McCormack wrote:
    > SM Ryan <> wrote:
    >> (Kenny McCormack) wrote:
    >># MJ <> wrote:
    >>#>
    >>#> I want to know what is mean by regular expression in C
    >>#
    >># C has expressions (e.g., 2+2) and they are used regularly.
    >># In fact, it is pretty hard to write a C program without using at
    >># least one such expression.
    >>
    >> Unable to settle for mere obnoxiousness, you now have to
    >> deliberately spread misinformation.

    >
    > What misinformation? What did I say that was either untrue or OT?
    >
    > Please be specific. Give examples.


    Note the source. While continuing to attempt to foul up as many
    newsreaders as possible with his obnoxious quote mark, he complains
    about a perfectly rational answer.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
     
    CBFalconer, Jul 12, 2005
    #10
    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:
    463
    Mary Chipman
    Jun 15, 2004
  2. VSK
    Replies:
    2
    Views:
    2,336
  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:
    863
    Alan Moore
    Dec 2, 2005
  4. GIMME
    Replies:
    3
    Views:
    11,997
    vforvikash
    Dec 29, 2008
  5. Noman Shapiro
    Replies:
    0
    Views:
    240
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page