Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

I need your help, big thanks!

Last post 10-05-2008, 7:15 AM by prometheuzz. 1 replies.
Sort Posts: Previous Next
  •  10-04-2008, 6:56 AM 46876

    I need your help, big thanks!

    Hi everyone,

    I'm new here and need your help.

    I have this HTML code:
    <span option=\"Item"><b>Item1</b></span>\r\n
    <span option=\"SubItem"><BR>\r\n&#149;&nbsp;subItem 1<BR>\r\n&#149;&nbsp;subItem 2<BR>\r\n</span><BR>\r\n<BR>\r\n

    <span option=\"Item"><b>Item12</b></span>\r\n
    <span option=\"SubItem"><BR>\r\n&#149;&nbsp;subItem 1<BR>\r\n&#149;&nbsp;subItem 2<BR>\r\n&#149;&nbsp;subItem 3<BR>\r\n</span><BR>\r\n<BR>\r\n

    <span option=\"Item"><b>ITEM33</b></span>\r\n
    <span option=\"SubItem"><BR>\r\n&#149;&nbsp;subItem 1<BR>\r\n</span><BR>\r\n<BR>\r\n

    <span option=\"Item"><b>Long ITEM 14</b></span>\r\n
    <span option=\"SubItem"><BR>\r\n&#149;&nbsp;subItem 1<BR>\r\n</span><BR>\r\n<BR>\r\n

    <span option=\"Item"><b>Maybe Item 13</b></span>\r\n
    <span option=\"SubItem"><BR>\r\n&#149;&nbsp;sub Item 1<BR>\r\n</span><BR>\r\n<BR>\r\n

    I need to extract the Item between the <b></b> (the Item) and the subItem between 149;&nbsp; and <br>
    Problem is I need it so I can receive an output in expresso software in the form of example:

    Item1
      SubItem1
      SubItem2
      ...
    Item2
      SubItem1
      SubItem2

    I have the code for taking out each one but it they are not together I can connect the subitems with the items...

    Here is the Regex for the items: <b>(?<Data>.*?)</b>
    Here is the one for the subItems: 149;&nbsp;(?<Data1>.*?)<br>  <--- note that I can't seperate them into groups, I get each Item in a seperate line...

    Many thanks in advance and god bless you.

     Bali

  •  10-05-2008, 7:15 AM 46886 in reply to 46876

    Re: I need your help, big thanks!

    When posting in multiple forums, please post a link in them so that people about to answer you can check whether you have been answered already or not.

    http://forums.devnetwork.net/viewtopic.php?f=38&t=89003

View as RSS news feed in XML