الرجوع الي الدرس
هذة المادة العلميه متاحه فقط باللغات الأتيه: English, Español, Français, Italiano, 日本語, 한국어, Русский, Українська, 简体中文. من فضلك, ساعدنا قم بالترجمه إلى عربي.

How to find an ellipsis "..." ?

الأهمية: 5

Create a regexp to find ellipsis: 3 (or more?) dots in a row.

Check it:

let regexp = /your regexp/g;
alert( "Hello!... How goes?.....".match(regexp) ); // ..., .....

Solution:

let regexp = /\.{3,}/g;
alert( "Hello!... How goes?.....".match(regexp) ); // ..., .....

Please note that the dot is a special character, so we have to escape it and insert as \..