help needed in getting item and subitem
Posted: Sat Oct 04, 2008 6:04 am
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• subItem 1<BR>\r\n• 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• subItem 1<BR>\r\n• subItem 2<BR>\r\n• 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• 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• 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• 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; 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; (?<Data1>.*?)<br> <--- note that I can't seperate them into groups, I get each Item in a seperate line...
Many thanks in advance.
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• subItem 1<BR>\r\n• 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• subItem 1<BR>\r\n• subItem 2<BR>\r\n• 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• 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• 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• 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; 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; (?<Data1>.*?)<br> <--- note that I can't seperate them into groups, I get each Item in a seperate line...
Many thanks in advance.