+ 1

Can somebody create a regex for me that matches all special characters(Except white space)?

I need a javascript regex that matches all special characters. var specialcharacters = txt.match(//SpecialCharactersGoHere);

25th Aug 2018, 1:36 AM
Daniel Cooper
Daniel Cooper - avatar
3 Antworten
+ 3
. Yeah that's the RegExp
25th Aug 2018, 1:59 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
Here, try this : txt.match("([^A-Za-z0-9]|\S)+");
25th Aug 2018, 3:26 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
txt.match(“[\W_]+”)
25th Aug 2018, 5:00 PM
krikkitbot
krikkitbot - avatar