Contact: aviboots(AT)netvision.net.il
42,709 questions
55,473 answers
573 users
const str = "What??? Why?? How?????"; // Use regular expression to match one or more '?' const result: string = str.replace(/\?+/g, "?"); console.log(result); /* run: "What? Why? How?" */