Search the Community
Showing results for tags 'html tag'.
-
I'm having trouble trying to collect data that's inside an html tag, I haven't found a solution to it yet. If you have ideas please help. Thank you Script: #include <String.au3> Global $HTML_Test $HTML_Test &= '<div class="accordion-item">' & @CRLF ; <!---- START GET--> $HTML_Test &= ' <div class="accordion-inner">' & @CRLF $HTML_Test &= ' <p>Khoá an toàn giúp bếp luôn được an toàn</p>' & @CRLF $HTML_Test &= ' </div>' & @CRLF $HTML_Test &= ' <a href="#" class="accordion-title plain">' & @CRLF $HTML_Test &= ' <button class="toggle">' & @CRLF $HTML_Test &= ' <i class="icon-angle-down"></i>' & @CRLF $HTML_Test &= ' </button>' & @CRLF $HTML_Test &= ' <span>Khoá an toàn</span>' & @CRLF $HTML_Test &= ' </a>' & @CRLF $HTML_Test &= '</div>' & @CRLF ;<!---- END GET --> Global $aSearch = _StringBetween($HTML_Test, '<div class="accordion-item">', '</div>') If IsArray($aSearch) Then For $i = 0 To UBound($aSearch) - 1 ConsoleWrite('!-> SB Return: ' & $aSearch[$i] & @CRLF) Next Else ConsoleWrite('! SB: No strings found. ' & @CRLF) EndIf Unexpected output: <div class="accordion-inner"> <p>Khoá an toàn giúp bếp luôn được an toàn</p> Input: <div class="accordion-item"> <div class="accordion-inner"> <p>Khoá an toàn giúp bếp luôn được an toàn</p> </div> <a href="#" class="accordion-title plain"> <button class="toggle"> <i class="icon-angle-down"></i> </button> <span>Khoá an toàn</span> </a> </div> Desired output: <div class="accordion-inner"> <p>Khoá an toàn giúp bếp luôn được an toàn</p> </div> <a href="#" class="accordion-title plain"> <button class="toggle"> <i class="icon-angle-down"></i> </button> <span>Khoá an toàn</span> </a>
-
I am working on a script that loads data from a file and displays it with bold, highlighted etc. text. The text looks something like this "This is <b>bold</b> text and this is <c=FF0000>red<c> text" So how exactly would I go about doing this. (maybe some StringRegExp() magic) NOTE: I want to load the text from a .txt file not a .rtf file. I've tried searching and found nothing of intrest.