Back to the lesson

How to find an ellipsis "..." ?

importance: 5

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

Check it:

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

Solution:

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

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