Skip to main content
added 37 characters in body
Source Link
Xcali
  • 17k
  • 2
  • 17
  • 42

Perl 5 -p, 6565 61 bytes

@NahuelFouilleul shaved 4 bytes

$_=/^(0[0-7]*|0x\p{Hex}+|[1-9]\d*)(u?l{0,2}?l?|l?l?u?)$/i*!/lL|Ll/*!/u.*u/i 

Try it online!Try it online!

Perl 5 -p, 65 bytes

$_=/^(0[0-7]*|0x\p{Hex}+|[1-9]\d*)u?l{0,2}u?$/i*!/lL|Ll/*!/u.*u/i 

Try it online!

Perl 5 -p, 65 61 bytes

@NahuelFouilleul shaved 4 bytes

$_=/^(0[0-7]*|0x\p{Hex}+|[1-9]\d*)(u?l?l?|l?l?u?)$/i*!/lL|Ll/ 

Try it online!

Source Link
Xcali
  • 17k
  • 2
  • 17
  • 42

Perl 5 -p, 65 bytes

$_=/^(0[0-7]*|0x\p{Hex}+|[1-9]\d*)u?l{0,2}u?$/i*!/lL|Ll/*!/u.*u/i 

Try it online!