#How to extract only special chars from String input?
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
How to extract only special chars from String input?
you could replace anything that isnt one of those with an empty string
thatll leave you with only the symbols
you'd use replaceAll, with a regex looking for any non-arithmetic characters
var regex = ...;
var newStr = oldStr.replaceAll(regex, "");```
newStr would contain everything after the replacement
the replacement would look for any non-arithmic characters