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. Other Discussions
  3. Article Writing
  4. Regular Expression In JavaScript

Regular Expression In JavaScript

Scheduled Pinned Locked Moved Article Writing
javascripthtmlregextutorialquestion
2 Posts 2 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.
  • V Offline
    V Offline
    vondon
    wrote on last edited by
    #1

    Hi I am new to regular expression, I have situation where I need to grab the value from the html page between the html tags and write out some where in that page. for example if I would like to grab the date between the open tag and close tag below. what should I do? Assume every page I will have Date_x0020_updated in side of open tag and close tag. 2005-04-06T00:00:00Z Thanks in advanced Lair

    E 1 Reply Last reply
    0
    • V vondon

      Hi I am new to regular expression, I have situation where I need to grab the value from the html page between the html tags and write out some where in that page. for example if I would like to grab the date between the open tag and close tag below. what should I do? Assume every page I will have Date_x0020_updated in side of open tag and close tag. 2005-04-06T00:00:00Z Thanks in advanced Lair

      E Offline
      E Offline
      Erik Thompson
      wrote on last edited by
      #2

      Use the method getElementsByTagName with the arguement "mso:Date_x0020_updated" which will return u a collection of those objects in the html page. Then with each HTML object call "innerText" or "innerHTML" to obtain the content between the object tags. No need for regular expressions to do this. or if getElementsByTagName is not available and you are using the HTMLDOM then try the document.all.tags("mso:Date_x0020_updated") to get a collection of objects and then for each item in the collection use innerText or innerHTML. Cheers, -Erik

      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