How to replace a period in a string using javascript or typescript using regex.
Using javascript regex command to replace a period with spaces.
Step 1 replace period with spaces.
let myString = "This is my string that needs to replace a period with a space. There are two periods." let regex = /\./gi; let result = myString.replace(regex, ""); console.log(result)