Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: 문자열에서 한글만 파싱 #108

Closed
youngjae99 opened this issue May 28, 2024 · 2 comments
Closed

[Feature]: 문자열에서 한글만 파싱 #108

youngjae99 opened this issue May 28, 2024 · 2 comments

Comments

@youngjae99
Copy link
Contributor

Description

문자열에서 한글만 추출(parse)할 수 있으면 좋을 것 같습니다.

parseHangul('안녕하세요1234abc') // '안녕하세요'
parseHangul('abcde') // ''
parseHangul('안녕하세요ㄱㄴ') // '안녕하세요ㄱㄴ'
parseHangul('안녕하세요    만나서 반갑습니다') // '안녕하세요    만나서 반갑습니다'
parseHangul('가나다!-29~라마바.,,사') // '가나다라마바사' 

Possible Solution

const parseHangul = (str: string): string => str.replace(/[^ㄱ-ㅎ가-힣\s]/g, '');

etc.

No response

@okinawaa
Copy link
Member

#136 여기서 internal utils에 추가되었습니다.

@okinawaa
Copy link
Member

#130 에서 extractHangul 이라는 한글만 추출하는 함수가 추가되었습니다.
이슈레이징 감사해요!! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants