Question : remove whitespace with regex javascript
Answered by : daniel-hemmati
return str.replace(/\s/g, '');
Source : https://stackoverflow.com/questions/7151159/javascript-regular-expression-remove-spaces | Last Update : Sun, 06 Dec 20
Question : JavaScript Regex - Remove Whitespace from Start and End
Answered by : abdelhadi-belaid
let hello = " Hello, World! ";
let wsRegex = /^\s+|\s+$/g;
let result = hello.replace(wsRegex, "");
Source : | Last Update : Fri, 11 Feb 22
Question : regex to ignore white spaces js
Answered by : rafiul-awal
myString.replace(/\s*/g,"")
Source : https://stackoverflow.com/questions/4590298/how-to-ignore-whitespace-in-a-regular-expression-subject-string | Last Update : Wed, 10 Nov 21