Показать сообщение отдельно
  #4 (permalink)  
Старый 26.07.2019, 07:28
Аватар для ksa
ksa ksa вне форума
CacheVar
Отправить личное сообщение для ksa Посмотреть профиль Найти все сообщения от ksa
 
Регистрация: 19.08.2010
Сообщений: 14,217

Rise, я даже не расстроился...

var txt='English singer, songwriter, guitarist, record producer, and actor... ';
txt+='He attended the Academy of Contemporary Music in Guildford as an undergraduate ';
txt+='from the age of 18.21 in 2009! In early 2011, Sheeran independently released ';
txt+='the extended play, No. 5 Collaborations Project. After signing with Asylum ';
txt+='Records, his debut album, +, was released in September 2011. It topped the ';
txt+='UK and Australian charts, reached number five in the US, and has since been ';
txt+='certified seven-times platinum in the UK. The album contains the single ';
txt+='"The A Team", which earned him the Ivor Novello Award for Best Song Musically ';
txt+='and Lyrically...';
txt=txt.replace(/(\d*)\.(\d+)/g,'$1,$2');
txt=txt.match(/([^\.!?]+([!?]|(\.{1,3}))\s?){1,2}/)[0];
txt=txt.replace(/(\d*)\,(\d+)/g,'$1.$2');
alert(txt);

Последний раз редактировалось ksa, 26.07.2019 в 07:37.
Ответить с цитированием