Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
var t = String.fromCharCodes(
s.codeUnits.where((x) => (x ^ 0x30) <= 9) );
t = filter (`elem` ['0'..'9']) s
t = s.replace(/[^\d]/gm,"");
String t = s.replaceAll("\\D+", "");
StringBuilder tb = new StringBuilder();
for (int i=0; i<s.length(); i++){
if(Character.isDigit(s.charAt(i)))
tb.append(s.charAt(i));
}
String t = tb.toString();
(let ((*t* (remove-if-not #'digit-char-p *s*)))
(format t "~A~%" *t*))
for i := 1 to length(s) do
if s[i] in ['0'..'9'] then
t := t + s[i];
($t = $s) =~ tr/0-9//cd;
my $t = $s;
$t =~ s/\D+//g;
t = s.delete("^0-9")
let t: String = s.chars().filter(|c| c.is_digit(10)).collect();