Python RegEX (How do I edit the Script I get from the page source as I want?)

I get the following script result from the page source. There’s no problem with that.

My goal: this is the result I got…In the output I obtained The first line that writes the script is too long and Therows [0] is at the end of the first line.

What I’m trying to do is: Deleting everything before Therows[0]. And it is the deletion of the last lines of the overlapping script.

note:Print output below: Move the cursor to the left to reach Therows [0] in the print result.

result I received from the page source

<script language="JavaScript"> var theHlp='/yardim/matris.asp';var theTitle = 'Piyasa Değeri';var theCaption='Bilişim ve Yazılım (TL)';var lastmod = '';var h='<a class=hisselink href=../Hisse/HisseAnaliz.aspx?HNO=';var e='<a class=hisselink href=../endeks/endeksAnaliz.aspx?HNO=';var d='<center><font face=symbol size=1 color=#FF0000><b>ß</b></font></center>';var u='<center><font face=symbol size=1 color=#008000><b>İ</b></font></center>';var n='<center><font face=symbol size=1 color=#00A000><b>=</b></font></center>';var fr='<font color=#FF0000>';var fg='<font color=#008000>';var theFooter=new Array();var theCols = new Array();theCols[0] = new Array('Hisse',4,50);theCols[1] = new Array('2008.03',1,60);theCols[2] = new Array('2008.06',1,60);theCols[3] = new Array('2008.09',1,60);theCols[4] = new Array('2008.12',1,60);theCols[5] = new Array('2009.03',1,60);theCols[6] = new Array('2009.06',1,60);theCols[7] = new Array('2009.09',1,60);theCols[8] = new Array('2009.12',1,60);theCols[9] = new Array('2010.03',1,60);theCols[10] = new Array('2010.06',1,60);theCols[11] = new Array('2010.09',1,60);theCols[12] = new Array('2010.12',1,60);theCols[13] = new Array('2011.03',1,60);theCols[14] = new Array('2011.06',1,60);theCols[15] = new Array('2011.09',1,60);theCols[16] = new Array('2011.12',1,60);theCols[17] = new Array('2012.03',1,60);theCols[18] = new Array('2012.06',1,60);theCols[19] = new Array('2012.09',1,60);var theRows = new Array();theRows[0] = new Array ('<b>'+h+'335>ARE</B></a>','46,080,000.00','32,320,000.00','25,600,000.00','19,520,000.00','21,280,000.00','40,640,000.00','54,080,000.00','66,880,000.00','71,680,000.00','96,640,000.00','94,720,000.00','87,040,000.00','83,840,000.00','78,720,000.00','77,760,000.00','75,520,000.00','85,120,000.00','71,360,000.00','70,080,000.00');
theRows[1] = new Array ('<b>'+h+'480>ARM</B></a>','17,640,000.00','19,800,000.00','17,640,000.00','8,160,000.00','13,200,000.00','14,160,000.00','17,880,000.00','16,560,000.00','18,480,000.00','19,440,000.00','21,840,000.00','34,440,000.00','36,360,000.00','36,960,000.00','31,680,000.00','35,040,000.00','47,280,000.00','43,920,000.00','43,200,000.00');
theRows[2] = new Array ('<b>'+h+'558>DES</B></a>','-','-','-','-','-','-','-','-','-','-','-','105,570,000.00','75,440,000.00','65,320,000.00','50,025,000.00','43,700,000.00','64,860,000.00','48,070,000.00','46,690,000.00');
theRows[3] = new Array ('<b>'+h+'458>DGA</B></a>','26,200,000.00','26,200,000.00','18,400,000.00','10,000,000.00','9,700,000.00','20,600,000.00','19,600,000.00','20,500,000.00','24,800,000.00','61,500,000.00','65,500,000.00','39,700,000.00','34,900,000.00','31,200,000.00','31,700,000.00','22,800,000.00','31,400,000.00','29,000,000.00','24,200,000.00');
theRows[4] = new Array ('<b>'+h+'130>ESC</B></a>','15,303,900.00','11,890,800.00','16,735,200.00','10,019,100.00','10,569,600.00','13,982,700.00','15,524,100.00','18,717,000.00','21,029,100.00','19,487,700.00','29,506,800.00','52,077,300.00','81,914,400.00','94,686,000.00','134,334,600.00','146,909,300.00','141,695,400.00','164,084,500.00','94,485,069.00');
theRows[5] = new Array ('<b>'+h+'1721>FON</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[6] = new Array ('<b>'+h+'428>IND</B></a>','99,120,000.00','79,520,000.00','58,800,000.00','52,640,000.00','49,280,000.00','72,800,000.00','82,880,000.00','90,720,000.00','103,600,000.00','127,680,000.00','130,480,000.00','150,640,000.00','156,800,000.00','184,240,000.00','147,840,000.00','128,800,000.00','163,520,000.00','176,400,000.00','176,400,000.00');
theRows[7] = new Array ('<b>'+h+'1734>KFE</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[8] = new Array ('<b>'+h+'333>LIN</B></a>','13,475,000.00','10,560,000.00','8,635,000.00','6,105,000.00','8,800,000.00','10,120,000.00','13,640,000.00','11,825,000.00','41,800,000.00','26,510,000.00','30,525,000.00','28,380,000.00','24,200,000.00','32,010,000.00','26,510,000.00','21,670,000.00','26,345,000.00','21,615,000.00','18,975,000.00');
theRows[9] = new Array ('<b>'+h+'205>LOG</B></a>','67,262,580.00','36,181,530.00','31,878,000.00','24,000,000.00','25,250,000.00','39,000,000.00','45,750,000.00','53,000,000.00','61,000,000.00','50,500,000.00','55,750,000.00','59,000,000.00','54,500,000.00','54,500,000.00','47,750,000.00','37,750,000.00','55,750,000.00','60,750,000.00','80,000,000.00');
theRows[10] = new Array ('<b>'+h+'1737>SMA</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
var thetable=new mytable();thetable.tableWidth=650;thetable.shownum=false;thetable.controlaccess=true;thetable.visCols=new Array(true,true,true,true,true);thetable.initsort=new Array(0,-1);thetable.inittable();thetable.refreshTable();</script>
<script language="JavaScript"> var theHlp='/yardim/matris.asp';var theTitle = 'Piyasa Değeri';var theCaption='Bina Malzemeleri (TL)';var lastmod = '';var h='<a class=hisselink href=../Hisse/HisseAnaliz.aspx?HNO=';var e='<a class=hisselink href=../endeks/endeksAnaliz.aspx?HNO=';var d='<center><font face=symbol size=1 color=#FF0000><b>ß</b></font></center>';var u='<center><font face=symbol size=1 color=#008000><b>İ</b></font></center>';var n='<center><font face=symbol size=1 color=#00A000><b>=</b></font></center>';var fr='<font color=#FF0000>';var fg='<font color=#008000>';var theFooter=new Array();var theCols = new Array();theCols[0] = new Array('Hisse',4,50);theCols[1] = new Array('2008.03',1,60);theCols[2] = new Array('2008.06',1,60);theCols[3] = new Array('2008.09',1,60);theCols[4] = new Array('2008.12',1,60);theCols[5] = new Array('2009.03',1,60);theCols[6] = new Array('2009.06',1,60);theCols[7] = new Array('2009.09',1,60);theCols[8] = new Array('2009.12',1,60);theCols[9] = new Array('2010.03',1,60);theCols[10] = new Array('2010.06',1,60);theCols[11] = new Array('2010.09',1,60);theCols[12] = new Array('2010.12',1,60);theCols[13] = new Array('2011.03',1,60);theCols[14] = new Array('2011.06',1,60);theCols[15] = new Array('2011.09',1,60);theCols[16] = new Array('2011.12',1,60);theCols[17] = new Array('2012.03',1,60);theCols[18] = new Array('2012.06',1,60);theCols[19] = new Array('2012.09',1,60);var theRows = new Array();theRows[0] = new Array ('<b>'+h+'647>AYE</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[1] = new Array ('<b>'+h+'568>BRK</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','43,360,000.00','-','58,080,000.00','107,040,000.00','228,000,000.00','70,668,000.00');
theRows[2] = new Array ('<b>'+h+'98>DOG</B></a>','16,201,380.70','13,519,772.86','13,904,000.00','11,376,000.00','13,272,000.00','26,228,000.00','18,486,000.00','25,280,000.00','25,438,000.00','22,436,000.00','22,752,000.00','25,800,000.00','25,600,000.00','29,200,000.00','23,400,000.00','22,200,000.00','71,200,000.00','29,800,000.00','37,600,000.00');
theRows[3] = new Array ('<b>'+h+'115>EGP</B></a>','188,718,400.00','133,429,856.00','122,707,814.00','86,372,005.00','103,050,737.00','129,260,173.00','170,361,334.00','315,704,570.00','449,730,095.00','601,625,690.00','586,733,965.00','462,239,144.00','418,159,638.00','390,758,864.00','369,314,780.00','284,134,113.00','364,549,428.00','304,982,528.00','291,877,810.00');
theRows[4] = new Array ('<b>'+h+'116>EGS</B></a>','121,500,000.00','65,250,000.00','51,000,000.00','30,000,000.00','39,000,000.00','60,000,000.00','66,750,000.00','75,000,000.00','108,000,000.00','90,000,000.00','116,250,000.00','168,000,000.00','215,250,000.00','173,250,000.00','146,250,000.00','110,250,000.00','154,500,000.00','135,750,000.00','168,750,000.00');
theRows[5] = new Array ('<b>'+h+'124>EPL</B></a>','13,800,000.00','14,400,000.00','22,400,000.00','14,000,000.00','12,600,000.00','13,800,000.00','12,200,000.00','18,400,000.00','19,200,000.00','19,000,000.00','17,200,000.00','14,400,000.00','14,600,000.00','13,000,000.00','12,800,000.00','9,800,000.00','16,600,000.00','15,600,000.00','37,600,000.00');
theRows[6] = new Array ('<b>'+h+'152>GOR</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[7] = new Array ('<b>'+h+'162>HZN</B></a>','22,050,000.00','20,370,000.00','17,850,000.00','11,760,000.00','21,210,000.00','22,995,000.00','24,255,000.00','30,870,000.00','29,820,000.00','32,760,000.00','38,220,000.00','36,960,000.00','33,705,000.00','41,055,000.00','35,280,000.00','38,850,000.00','40,110,000.00','50,400,000.00','49,140,000.00');
theRows[8] = new Array ('<b>'+h+'170>INT</B></a>','23,814,000.00','16,524,000.00','18,954,000.00','11,664,000.00','14,871,600.00','18,273,600.00','23,133,600.00','26,244,000.00','37,908,000.00','32,805,000.00','35,235,000.00','36,838,800.00','33,728,400.00','43,448,400.00','79,218,000.00','52,488,000.00','58,806,000.00','57,105,000.00','56,619,000.00');
theRows[9] = new Array ('<b>'+h+'181>IZO</B></a>','463,695,309.32','350,838,249.91','296,863,134.54','214,673,754.31','316,490,449.22','414,627,022.62','517,670,424.69','569,192,125.72','711,490,157.15','662,421,870.45','662,421,870.45','836,614,288.24','1,288,042,525.88','1,263,508,382.53','1,221,800,338.83','978,912,319.67','1,150,651,323.12','1,069,688,650.06','1,018,166,949.03');
theRows[10] = new Array ('<b>'+h+'244>PIM</B></a>','53,280,000.00','35,280,000.00','30,060,000.00','32,220,000.00','30,600,000.00','99,900,000.00','64,800,000.00','61,920,000.00','69,480,000.00','64,800,000.00','67,680,000.00','64,260,000.00','68,940,000.00','64,080,000.00','65,520,000.00','64,620,000.00','65,880,000.00','55,440,000.00','56,340,000.00');
theRows[11] = new Array ('<b>'+h+'310>USA</B></a>','14,300,857.15','11,989,607.51','12,278,513.71','6,355,936.51','7,800,467.54','17,478,825.40','21,667,965.38','17,334,372.30','21,090,152.97','24,701,480.53','25,423,746.04','29,612,886.01','69,337,489.20','92,738,891.81','169,732,395.44','34,090,932.19','48,102,883.13','59,659,131.33','55,903,350.67');
var thetable=new mytable();thetable.tableWidth=650;thetable.shownum=false;thetable.controlaccess=true;thetable.visCols=new Array(true,true,true,true,true);thetable.initsort=new Array(0,-1);thetable.inittable();thetable.refreshTable();</script>

How can I do that. The result I am trying to achieve: How can I do this with Regex?

theRows[0] = new Array ('<b>'+h+'335>ARE</B></a>','46,080,000.00','32,320,000.00','25,600,000.00','19,520,000.00','21,280,000.00','40,640,000.00','54,080,000.00','66,880,000.00','71,680,000.00','96,640,000.00','94,720,000.00','87,040,000.00','83,840,000.00','78,720,000.00','77,760,000.00','75,520,000.00','85,120,000.00','71,360,000.00','70,080,000.00');
theRows[1] = new Array ('<b>'+h+'480>ARM</B></a>','17,640,000.00','19,800,000.00','17,640,000.00','8,160,000.00','13,200,000.00','14,160,000.00','17,880,000.00','16,560,000.00','18,480,000.00','19,440,000.00','21,840,000.00','34,440,000.00','36,360,000.00','36,960,000.00','31,680,000.00','35,040,000.00','47,280,000.00','43,920,000.00','43,200,000.00');
theRows[2] = new Array ('<b>'+h+'558>DES</B></a>','-','-','-','-','-','-','-','-','-','-','-','105,570,000.00','75,440,000.00','65,320,000.00','50,025,000.00','43,700,000.00','64,860,000.00','48,070,000.00','46,690,000.00');
theRows[3] = new Array ('<b>'+h+'458>DGA</B></a>','26,200,000.00','26,200,000.00','18,400,000.00','10,000,000.00','9,700,000.00','20,600,000.00','19,600,000.00','20,500,000.00','24,800,000.00','61,500,000.00','65,500,000.00','39,700,000.00','34,900,000.00','31,200,000.00','31,700,000.00','22,800,000.00','31,400,000.00','29,000,000.00','24,200,000.00');
theRows[4] = new Array ('<b>'+h+'130>ESC</B></a>','15,303,900.00','11,890,800.00','16,735,200.00','10,019,100.00','10,569,600.00','13,982,700.00','15,524,100.00','18,717,000.00','21,029,100.00','19,487,700.00','29,506,800.00','52,077,300.00','81,914,400.00','94,686,000.00','134,334,600.00','146,909,300.00','141,695,400.00','164,084,500.00','94,485,069.00');
theRows[5] = new Array ('<b>'+h+'1721>FON</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[6] = new Array ('<b>'+h+'428>IND</B></a>','99,120,000.00','79,520,000.00','58,800,000.00','52,640,000.00','49,280,000.00','72,800,000.00','82,880,000.00','90,720,000.00','103,600,000.00','127,680,000.00','130,480,000.00','150,640,000.00','156,800,000.00','184,240,000.00','147,840,000.00','128,800,000.00','163,520,000.00','176,400,000.00','176,400,000.00');
theRows[7] = new Array ('<b>'+h+'1734>KFE</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[8] = new Array ('<b>'+h+'333>LIN</B></a>','13,475,000.00','10,560,000.00','8,635,000.00','6,105,000.00','8,800,000.00','10,120,000.00','13,640,000.00','11,825,000.00','41,800,000.00','26,510,000.00','30,525,000.00','28,380,000.00','24,200,000.00','32,010,000.00','26,510,000.00','21,670,000.00','26,345,000.00','21,615,000.00','18,975,000.00');
theRows[9] = new Array ('<b>'+h+'205>LOG</B></a>','67,262,580.00','36,181,530.00','31,878,000.00','24,000,000.00','25,250,000.00','39,000,000.00','45,750,000.00','53,000,000.00','61,000,000.00','50,500,000.00','55,750,000.00','59,000,000.00','54,500,000.00','54,500,000.00','47,750,000.00','37,750,000.00','55,750,000.00','60,750,000.00','80,000,000.00');
theRows[10] = new Array ('<b>'+h+'1737>SMA</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[0] = new Array ('<b>'+h+'647>AYE</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[1] = new Array ('<b>'+h+'568>BRK</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','43,360,000.00','-','58,080,000.00','107,040,000.00','228,000,000.00','70,668,000.00');
theRows[2] = new Array ('<b>'+h+'98>DOG</B></a>','16,201,380.70','13,519,772.86','13,904,000.00','11,376,000.00','13,272,000.00','26,228,000.00','18,486,000.00','25,280,000.00','25,438,000.00','22,436,000.00','22,752,000.00','25,800,000.00','25,600,000.00','29,200,000.00','23,400,000.00','22,200,000.00','71,200,000.00','29,800,000.00','37,600,000.00');
theRows[3] = new Array ('<b>'+h+'115>EGP</B></a>','188,718,400.00','133,429,856.00','122,707,814.00','86,372,005.00','103,050,737.00','129,260,173.00','170,361,334.00','315,704,570.00','449,730,095.00','601,625,690.00','586,733,965.00','462,239,144.00','418,159,638.00','390,758,864.00','369,314,780.00','284,134,113.00','364,549,428.00','304,982,528.00','291,877,810.00');
theRows[4] = new Array ('<b>'+h+'116>EGS</B></a>','121,500,000.00','65,250,000.00','51,000,000.00','30,000,000.00','39,000,000.00','60,000,000.00','66,750,000.00','75,000,000.00','108,000,000.00','90,000,000.00','116,250,000.00','168,000,000.00','215,250,000.00','173,250,000.00','146,250,000.00','110,250,000.00','154,500,000.00','135,750,000.00','168,750,000.00');
theRows[5] = new Array ('<b>'+h+'124>EPL</B></a>','13,800,000.00','14,400,000.00','22,400,000.00','14,000,000.00','12,600,000.00','13,800,000.00','12,200,000.00','18,400,000.00','19,200,000.00','19,000,000.00','17,200,000.00','14,400,000.00','14,600,000.00','13,000,000.00','12,800,000.00','9,800,000.00','16,600,000.00','15,600,000.00','37,600,000.00');
theRows[6] = new Array ('<b>'+h+'152>GOR</B></a>','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-');
theRows[7] = new Array ('<b>'+h+'162>HZN</B></a>','22,050,000.00','20,370,000.00','17,850,000.00','11,760,000.00','21,210,000.00','22,995,000.00','24,255,000.00','30,870,000.00','29,820,000.00','32,760,000.00','38,220,000.00','36,960,000.00','33,705,000.00','41,055,000.00','35,280,000.00','38,850,000.00','40,110,000.00','50,400,000.00','49,140,000.00');
theRows[8] = new Array ('<b>'+h+'170>INT</B></a>','23,814,000.00','16,524,000.00','18,954,000.00','11,664,000.00','14,871,600.00','18,273,600.00','23,133,600.00','26,244,000.00','37,908,000.00','32,805,000.00','35,235,000.00','36,838,800.00','33,728,400.00','43,448,400.00','79,218,000.00','52,488,000.00','58,806,000.00','57,105,000.00','56,619,000.00');
theRows[9] = new Array ('<b>'+h+'181>IZO</B></a>','463,695,309.32','350,838,249.91','296,863,134.54','214,673,754.31','316,490,449.22','414,627,022.62','517,670,424.69','569,192,125.72','711,490,157.15','662,421,870.45','662,421,870.45','836,614,288.24','1,288,042,525.88','1,263,508,382.53','1,221,800,338.83','978,912,319.67','1,150,651,323.12','1,069,688,650.06','1,018,166,949.03');
theRows[10] = new Array ('<b>'+h+'244>PIM</B></a>','53,280,000.00','35,280,000.00','30,060,000.00','32,220,000.00','30,600,000.00','99,900,000.00','64,800,000.00','61,920,000.00','69,480,000.00','64,800,000.00','67,680,000.00','64,260,000.00','68,940,000.00','64,080,000.00','65,520,000.00','64,620,000.00','65,880,000.00','55,440,000.00','56,340,000.00');
theRows[11] = new Array ('<b>'+h+'310>USA</B></a>','14,300,857.15','11,989,607.51','12,278,513.71','6,355,936.51','7,800,467.54','17,478,825.40','21,667,965.38','17,334,372.30','21,090,152.97','24,701,480.53','25,423,746.04','29,612,886.01','69,337,489.20','92,738,891.81','169,732,395.44','34,090,932.19','48,102,883.13','59,659,131.33','55,903,350.67');