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. Web Development
  3. JavaScript
  4. Regular expression

Regular expression

Scheduled Pinned Locked Moved JavaScript
regexquestionjavascripthtmlhelp
4 Posts 3 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.
  • P Offline
    P Offline
    Phrone
    wrote on last edited by
    #1

    I need help with regular expression. I have some html code into a variable that is named xmlDoc. The code includes a table and there are some things there that I want to pick out with regex.

    6
    Prentice, Bob
    340584305858
    Logged out

    [Edit](javascript:doEditAgent("56746")),
    [Delete](javascript:doRemoveAgent("56746", "fn1")),
    [Log in](javascript:doLoginLogout("4", "56746","fn1"))

    In this code I want to pick out: 1. The name, "Prentice, Bob" 2. The status, "Logged out" 3. The content from doLoginLogout(), "4", "56746","fn1" How do I do this? There are five rows similar to this in the table that I need to do this on.

    F 1 Reply Last reply
    0
    • P Phrone

      I need help with regular expression. I have some html code into a variable that is named xmlDoc. The code includes a table and there are some things there that I want to pick out with regex.

      6
      Prentice, Bob
      340584305858
      Logged out

      [Edit](javascript:doEditAgent("56746")),
      [Delete](javascript:doRemoveAgent("56746", "fn1")),
      [Log in](javascript:doLoginLogout("4", "56746","fn1"))

      In this code I want to pick out: 1. The name, "Prentice, Bob" 2. The status, "Logged out" 3. The content from doLoginLogout(), "4", "56746","fn1" How do I do this? There are five rows similar to this in the table that I need to do this on.

      F Offline
      F Offline
      Firo Atrum Ventus
      wrote on last edited by
      #2

      If you're asking about how to use Regexp in JavaScript, Google[^] can help you. If you're asking about the regexp string, ask here[^].

      Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D

      P 1 Reply Last reply
      0
      • F Firo Atrum Ventus

        If you're asking about how to use Regexp in JavaScript, Google[^] can help you. If you're asking about the regexp string, ask here[^].

        Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D

        P Offline
        P Offline
        Phrone
        wrote on last edited by
        #3

        Thanks, I totaly missed that there where a special Regular expression section here.

        U 1 Reply Last reply
        0
        • P Phrone

          Thanks, I totaly missed that there where a special Regular expression section here.

          U Offline
          U Offline
          User 2149376
          wrote on last edited by
          #4

          Using XPath might be a better idea to parse things out of an XML file. Just a thought. It may not apply to your application.

          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