set html "<quite much html code></a><br><again much html code></a><br><even more html code> .... (and so on)</a><br> </td>"
regsub -all "<br>" $html "\n" html
set lines [split $html "\n"]
Note you don't get pure lines of text from this -- it leaves all other tags in the code. You could use another regsub to get rid of them.
set html "<quite much html code></a><br><again much html code></a><br><even more html code> .... (and so on)</a><br> </td>"
regsub -all "<br>" $html "\n" html
set lines [split $html "\n"]
how could i acces to the lines with some kinda array (like in delphi information[1], information[2], etc) ? i could loop i throught a counter and check all lines easily with that.
set html "<quite much html code></a><br><again much html code></a><br><even more html code> .... (and so on)</a><br> </td>"
createarray this $html "<br>"
puts stdout "First line: $this(1)"
puts stdout "Second: $this(2)"
Unlike some langs, you can't go out of bounds with Tcl arrays. It causes an error of "Variable doesn't exist".
You may find it is far easier to stick with the existing code (the one posted in your previous reply), and use "[lindex $lines 0]" and so on.