Created
August 15, 2022 15:21
-
-
Save vadimkantorov/e038d9102d0b340589f4be0dbe3d23f8 to your computer and use it in GitHub Desktop.
Grep all Hebrew strings from stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat foo.html | python heb.py | |
# https://en.wikipedia.org/wiki/Hebrew_(Unicode_block) | |
import re, sys; print('\n'.join(filter(bool, map(str.strip, re.findall(u'[ \u0590-\u05ff]+', sys.stdin.read()))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment