Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Created August 15, 2022 15:21
Show Gist options
  • Save vadimkantorov/e038d9102d0b340589f4be0dbe3d23f8 to your computer and use it in GitHub Desktop.
Save vadimkantorov/e038d9102d0b340589f4be0dbe3d23f8 to your computer and use it in GitHub Desktop.
Grep all Hebrew strings from stdin
# 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