Skip to content

Instantly share code, notes, and snippets.

@wonsuc
Created August 30, 2022 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wonsuc/4bb9da2516dcaba7e63c3bfbcdd6a18a to your computer and use it in GitHub Desktop.
Save wonsuc/4bb9da2516dcaba7e63c3bfbcdd6a18a to your computer and use it in GitHub Desktop.
let input = '안녕 하세요 !';
const match = input.match(/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]|\s/g);
// match: (7) ['안', '녕', ' ', '하', '세', '요', ' ']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment