三点リーダー(「...」)を見つける方法
importance: 5
三点リーダー(3つ以上の点を連続で)を見つける正規表現を作成してください。
チェックする
let
regexp =
/
your regexp
/
g
;
alert
(
"Hello!... How goes?....."
.
match
(
regexp)
)
;
// ..., .....
解答
let
regexp =
/
\.{3,}
/
g
;
alert
(
"Hello!... How goes?....."
.
match
(
regexp)
)
;
// ..., .....
ドットは特別な文字なので、エスケープして「\.」として挿入する必要がある点に注意してください。