79568145

Date: 2025-04-11 06:37:45
Score: 3
Natty:
Report link

You can do it with this regex

let str = '24?22?3'

digitsOnly = str.replace(/\D/g, '');

//digitsOnly='24223'

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Acke