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. General Programming
  3. Regular Expressions
  4. html tag finder

html tag finder

Scheduled Pinned Locked Moved Regular Expressions
htmlregex
6 Posts 5 Posters 20 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.
  • M Offline
    M Offline
    moein serpico
    wrote on last edited by
    #1

    hi guys i wanna a pattern to find number of html control in whole page i test this pattern but thers no result:

    @"\b((<\s*"+pattern+@"{1})\s(\s*\w*\s*\W*\s*\d*\s*)*/>\b)"

    that pattern is a variable that contain like img,input and so on

    P OriginalGriffO A H 4 Replies Last reply
    0
    • M moein serpico

      hi guys i wanna a pattern to find number of html control in whole page i test this pattern but thers no result:

      @"\b((<\s*"+pattern+@"{1})\s(\s*\w*\s*\W*\s*\d*\s*)*/>\b)"

      that pattern is a variable that contain like img,input and so on

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Perhaps show examples of the HTML and pattern.

      1 Reply Last reply
      0
      • M moein serpico

        hi guys i wanna a pattern to find number of html control in whole page i test this pattern but thers no result:

        @"\b((<\s*"+pattern+@"{1})\s(\s*\w*\s*\W*\s*\d*\s*)*/>\b)"

        that pattern is a variable that contain like img,input and so on

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        I'm not in the least bit supprised it doesn't work as you expected. It isn't a valid regex. Go to www.ultraPico.com[^] and D/L a copy of Expresso - it examines, designs and explains regexes. It's free, and I use it a lot. I really wish I'd written it!

        Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        A 1 Reply Last reply
        0
        • M moein serpico

          hi guys i wanna a pattern to find number of html control in whole page i test this pattern but thers no result:

          @"\b((<\s*"+pattern+@"{1})\s(\s*\w*\s*\W*\s*\d*\s*)*/>\b)"

          that pattern is a variable that contain like img,input and so on

          A Offline
          A Offline
          AspDotNetDev
          wrote on last edited by
          #4

          Take out both occurrences of "\b".

          moein.serpico wrote:

          {1}

          That is completely useless.

          moein.serpico wrote:

          (\s*\w*\s*\W*\s*\d*\s*)*

          And what is all that for?

          [Forum Guidelines]

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            I'm not in the least bit supprised it doesn't work as you expected. It isn't a valid regex. Go to www.ultraPico.com[^] and D/L a copy of Expresso - it examines, designs and explains regexes. It's free, and I use it a lot. I really wish I'd written it!

            Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

            A Offline
            A Offline
            AspDotNetDev
            wrote on last edited by
            #5

            OriginalGriff wrote:

            It isn't a valid regex.

            Works fine for me. Doesn't produce the expected results, but it will compile and it does return results under certain scenarios.

            [Forum Guidelines]

            1 Reply Last reply
            0
            • M moein serpico

              hi guys i wanna a pattern to find number of html control in whole page i test this pattern but thers no result:

              @"\b((<\s*"+pattern+@"{1})\s(\s*\w*\s*\W*\s*\d*\s*)*/>\b)"

              that pattern is a variable that contain like img,input and so on

              H Offline
              H Offline
              Hiren solanki
              wrote on last edited by
              #6

              You could have my TIP[^] to be useful.

              Regards, Hiren.

              My Recent Article: - Way to know which control have raised PostBack
              My Recent Tip/Trick: - Remove HTML Tag, get plain Text

              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