Hello Guys Iam trying to Remove the WhiteSpaces “start and End of a string” this is my code.
note its still failing
let hello = " Hello, World! ";
let wsRegex = /(^[\s+$]*)/g; // Change this line
let result = hello.replace(/(^[\s+$]*)/,''); // Change this line
Any TIP? Thank you
snigo
2
I suppose you’re specifically asked not to use .trim(), right?
This is incorrect regex. You can check how it works here:
Same website might help with debugging 
Thank you i will check it out!