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
  1. Home
  2. The Lounge
  3. regular expression questions???

regular expression questions???

Scheduled Pinned Locked Moved The Lounge
csharphtmlregexhelptutorial
9 Posts 8 Posters 0 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.
  • S Offline
    S Offline
    Small Rat
    wrote on last edited by
    #1

    Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

    Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

    R S M R P 5 Replies Last reply
    0
    • S Small Rat

      Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

      Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

      R Offline
      R Offline
      Ri Qen Sin
      wrote on last edited by
      #2

      This whould be a bad place to ask this type of question Mr. Shen. You might want to post in another forum on the site. Nobody will answer it here.

      ROFLOLMFAO

      1 Reply Last reply
      0
      • S Small Rat

        Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

        Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        Do not post programming questions (use the programming forums for that) and please don't post ads. And so please post your questions in the suitable forum. and also before posting your questions just read the guidelines and then do it. Here(in Lounge) no one will help.

        SSK. Anyone who says sunshine brings happiness has never danced in the rain.

        R 1 Reply Last reply
        0
        • S Sathesh Sakthivel

          Do not post programming questions (use the programming forums for that) and please don't post ads. And so please post your questions in the suitable forum. and also before posting your questions just read the guidelines and then do it. Here(in Lounge) no one will help.

          SSK. Anyone who says sunshine brings happiness has never danced in the rain.

          R Offline
          R Offline
          Rama Krishna Vavilala
          wrote on last edited by
          #4

          Well said Satips!

          Co-Author ASP.NET AJAX in Action CP Quote of the Day: It is the same Friday that blooms as a new enriching day with novelty and innovation for us every week. - Vasudevan Deepak Kumar

          S 1 Reply Last reply
          0
          • S Small Rat

            Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

            Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

            M Offline
            M Offline
            MidwestLimey
            wrote on last edited by
            #5

            ^.*$ or ^(.(.(.(.(.(.(.(.(.(.(.(.(.(.*)*)*)*)*)*)*)*)*)*)*)*)*)*)$ ;)


            I'm largely language agnostic


            After a while they all bug me :doh:


            1 Reply Last reply
            0
            • S Small Rat

              Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

              Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

              R Offline
              R Offline
              Rocky Moore
              wrote on last edited by
              #6

              A search on google will turn up a ton of sites that have libaries of posts of searchings of similar types. The first step for anyone starting to work with Regular Expressions is: http://www.ultrapico.com/Expresso.htm[^] Cool free tool to help build and test RegEx!

              Rocky <>< Blog Post: Silverlight goes Beta 2.0 Tech Blog Post: Cheap Biofuels and Synthetics coming soon?

              1 Reply Last reply
              0
              • S Small Rat

                Hi, I want get all the occurences for one string (e.g. keyword) in an ASP or html file. But I want to ignore some special html/asp tag that includes the searched string (in my case it is "keyword"). for example: 1) this is a test keyword string. (I want this) 2) the is second keyword anchor (I don't want this) 2) <% 'this is keyword in asp code %> (I don't want this) I know regular express may solve this problem. But I don't know how?? Can somebody give me an example regular exression for this?? Thanks a lot!

                Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

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

                I have to ask if you're always this stupid or have you made an extra effort today? This is the lounge - so no programming questions. You remind me of the saying "Brains and looks aren't everything. In fact, in your case they are absolutely nothing."

                Small Rat wrote:

                MCAD for .NET Version

                So why are you asking about ASP?

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

                My blog | My articles

                1 Reply Last reply
                0
                • R Rama Krishna Vavilala

                  Well said Satips!

                  Co-Author ASP.NET AJAX in Action CP Quote of the Day: It is the same Friday that blooms as a new enriching day with novelty and innovation for us every week. - Vasudevan Deepak Kumar

                  S Offline
                  S Offline
                  Sathesh Sakthivel
                  wrote on last edited by
                  #8

                  Thanks Rama.

                  SSK. Anyone who says sunshine brings happiness has never danced in the rain.

                  R 1 Reply Last reply
                  0
                  • S Sathesh Sakthivel

                    Thanks Rama.

                    SSK. Anyone who says sunshine brings happiness has never danced in the rain.

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #9

                    You're welcome, Satips.


                    Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->ßRÅhmmÃ<-·´¯`·.

                    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