var HM = new Array(); HM[1] = "<name>Имя</name>"; HM[2] = "<name>Имя2</name>"; alert( HM[1].match(/>(.+?)</)[1] );