Skip to content

Instantly share code, notes, and snippets.

@jasoncable
Created October 29, 2020 19:26
Show Gist options
  • Save jasoncable/7cac2e5f4934aa2d3c7ffb55b09fa2fd to your computer and use it in GitHub Desktop.
Save jasoncable/7cac2e5f4934aa2d3c7ffb55b09fa2fd to your computer and use it in GitHub Desktop.
Valid Windows File Name Regex
Regex r = new Regex("[<>:\"/|?*~]|\\.\\.");
// if it matches, you have bad characters in your Windows file name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment