Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Search a string in a paragraph

Search a string in a paragraph

Scheduled Pinned Locked Moved ASP.NET
tutorial
11 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NET India
    wrote on last edited by
    #1

    I think u didn't get my prob. correctly............ Actually i've a textbox(Multiline) in which i've to search a particular string Example:- this is a paragraph given below and i have to search a string "quick" then answer would be 4 The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U.

    S P I 3 Replies Last reply
    0
    • N NET India

      I think u didn't get my prob. correctly............ Actually i've a textbox(Multiline) in which i've to search a particular string Example:- this is a paragraph given below and i have to search a string "quick" then answer would be 4 The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U.

      S Offline
      S Offline
      Sun Rays
      wrote on last edited by
      #2

      Hi, check this. http://www.codeproject.com/script/comments/forums.asp?msg=2325172&forumid=1649&mode=all&userid=3518080#xx2325172xx[^]

      Thanks, Sun Rays To get something you must have to try once. My Articles

      1 Reply Last reply
      0
      • N NET India

        I think u didn't get my prob. correctly............ Actually i've a textbox(Multiline) in which i've to search a particular string Example:- this is a paragraph given below and i have to search a string "quick" then answer would be 4 The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        And it's a dodgy cross post as well.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        N 1 Reply Last reply
        0
        • N NET India

          I think u didn't get my prob. correctly............ Actually i've a textbox(Multiline) in which i've to search a particular string Example:- this is a paragraph given below and i have to search a string "quick" then answer would be 4 The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U. The quick brown fox jumps over the little lazy dog.Hello How R U.

          I Offline
          I Offline
          InsDev
          wrote on last edited by
          #4

          Get to solve ur problem. function wordCount(str) { var count = 0; var _arrWord = str.split(" "); for (i=0 ; i < _arrWord.length ; i++) { if (_arrWord[i] == "quick") count += 1; } alert("Total Word Count: " +count); } Devjit Das.

          N 1 Reply Last reply
          0
          • P Pete OHanlon

            And it's a dodgy cross post as well.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            N Offline
            N Offline
            NET India
            wrote on last edited by
            #5

            No it's a dodgy ................ i think you didnt get the meaning of my question properly at all! Read the other part of this thread ????????????????????

            P 1 Reply Last reply
            0
            • I InsDev

              Get to solve ur problem. function wordCount(str) { var count = 0; var _arrWord = str.split(" "); for (i=0 ; i < _arrWord.length ; i++) { if (_arrWord[i] == "quick") count += 1; } alert("Total Word Count: " +count); } Devjit Das.

              N Offline
              N Offline
              NET India
              wrote on last edited by
              #6

              int num=0; //This line get the word to be searched string title=dt.Rows[0]["Title"].ToString(); //This line get a paragraph in which searchintg to be.. string content=dt.Rows[0]["Content"].ToString(); for(int i=0;i

              I 1 Reply Last reply
              0
              • N NET India

                int num=0; //This line get the word to be searched string title=dt.Rows[0]["Title"].ToString(); //This line get a paragraph in which searchintg to be.. string content=dt.Rows[0]["Content"].ToString(); for(int i=0;i

                I Offline
                I Offline
                InsDev
                wrote on last edited by
                #7

                so what's the problem convert that concept as where u like to u. i think it will work. Devjit Das.

                N 1 Reply Last reply
                0
                • I InsDev

                  so what's the problem convert that concept as where u like to u. i think it will work. Devjit Das.

                  N Offline
                  N Offline
                  NET India
                  wrote on last edited by
                  #8

                  do u really think my code(i've given in my last post) is correct ???????

                  I 1 Reply Last reply
                  0
                  • N NET India

                    No it's a dodgy ................ i think you didnt get the meaning of my question properly at all! Read the other part of this thread ????????????????????

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #9

                    The Knowledge wrote:

                    think you didnt get the meaning of my question properly at all!

                    I did. That's why I recognised it as a cross post. Please don't post the same question (or in this case part of a clarification) to multiple forums.

                    Deja View - the feeling that you've seen this post before.

                    My blog | My articles

                    1 Reply Last reply
                    0
                    • N NET India

                      do u really think my code(i've given in my last post) is correct ???????

                      I Offline
                      I Offline
                      InsDev
                      wrote on last edited by
                      #10

                      I haven't check ur code.It is ur way to check ur code. we can provide only concept not the code. ok man. Devjit Das.

                      N 1 Reply Last reply
                      0
                      • I InsDev

                        I haven't check ur code.It is ur way to check ur code. we can provide only concept not the code. ok man. Devjit Das.

                        N Offline
                        N Offline
                        NET India
                        wrote on last edited by
                        #11

                        kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups