Skip to content

Instantly share code, notes, and snippets.

@mendes5
Created May 11, 2021 18:55
Show Gist options
  • Select an option

  • Save mendes5/b3869ac5503c603d0bd4e3ff0a22ee48 to your computer and use it in GitHub Desktop.

Select an option

Save mendes5/b3869ac5503c603d0bd4e3ff0a22ee48 to your computer and use it in GitHub Desktop.
Regex flags
'abcdefghijklmnopqrstuvwxyz'
  .split('')
  .map(x => { try { new RegExp('0', x); return x } catch { return false } } )
  .filter(Boolean)
  .join('')

Chrome

dgimsuy (sorted automatically)

Node

gimsuy (sorted automatically)

What does the d flag does?

Not sure, but i got a new username: Gimsuy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment