what is regular expression

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

    what is regular expression

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

  • SM Ryan

    #2
    Re: what is regular expression

    "MJ" <mayurdjain@gma il.com> 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.

    Comment

    • Keith Thompson

      #3
      Re: what is regular expression

      "MJ" <mayurdjain@gma il.com> writes:[color=blue]
      > I want to know what is mean by regular expression in C[/color]

      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_Keit h) kst-u@mib.org <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.

      Comment

      • Kenny McCormack

        #4
        Re: what is regular expression

        In article <1121150436.843 617.173740@z14g 2000cwz.googleg roups.com>,
        MJ <mayurdjain@gma il.com> wrote:[color=blue]
        >HI
        >I want to know what is mean by regular expression in C[/color]

        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

        Comment

        • CBFalconer

          #5
          Re: what is regular expression

          MJ wrote:[color=blue]
          >
          > I want to know what is mean by regular expression in C[/color]

          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.c om, 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


          Comment

          • SM Ryan

            #6
            Re: what is regular expression

            gazelle@yin.int eraccess.com (Kenny McCormack) wrote:
            # In article <1121150436.843 617.173740@z14g 2000cwz.googleg roups.com>,
            # MJ <mayurdjain@gma il.com> 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.

            Comment

            • Sensei

              #7
              Re: what is regular expression

              On 2005-07-12 01:40:36 -0500, "MJ" <mayurdjain@gma il.com> said:
              [color=blue]
              > HI I want to know what is mean by regular expression in C Mayur[/color]

              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 <senseiwa@tin.i t>

              cd /pub
              more beer

              Comment

              • Kenny McCormack

                #8
                Re: what is regular expression

                In article <11d7vntsd0546b 8@corp.supernew s.com>,
                SM Ryan <wyrmwif@tang o-sierra-oscar-foxtrot-tango.fake.org> wrote:[color=blue]
                >gazelle@yin.in teraccess.com (Kenny McCormack) wrote:
                ># In article <1121150436.843 617.173740@z14g 2000cwz.googleg roups.com>,
                ># MJ <mayurdjain@gma il.com> 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.[/color]

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

                Please be specific. Give examples.

                Comment

                • Clint Olsen

                  #9
                  Re: what is regular expression

                  On 2005-07-12, MJ <mayurdjain@gma il.com> wrote:[color=blue]
                  > I want to know what is mean by regular expression in C
                  > Mayur[/color]

                  Regular expressions are actually more of a language topic. You'd probably
                  have better luck learning about those in comp.compilers and
                  comp.programmin g. 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

                  Comment

                  • CBFalconer

                    #10
                    Re: what is regular expression

                    Kenny McCormack wrote:[color=blue]
                    > SM Ryan <wyrmwif@tang o-sierra-oscar-foxtrot-tango.fake.org> wrote:[color=green]
                    >> gazelle@yin.int eraccess.com (Kenny McCormack) wrote:
                    >># MJ <mayurdjain@gma il.com> 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.[/color]
                    >
                    > What misinformation? What did I say that was either untrue or OT?
                    >
                    > Please be specific. Give examples.[/color]

                    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.c om, 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


                    Comment

                    Working...